Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To hell with get_stacktrace! #2494

Merged
merged 3 commits into from
Oct 17, 2019
Merged

To hell with get_stacktrace! #2494

merged 3 commits into from
Oct 17, 2019

Conversation

NelsonVides
Copy link
Collaborator

@NelsonVides NelsonVides commented Oct 16, 2019

Now only some dependencies are still giving that silly get_stacktrace/0 deprecated warning. To be precise, exactly these dependencies (and dependencies of dependencies and so on):

  • worker_pool
  • katana
  • proper
  • pooler
  • cqerl
  • eper
  • nklib
  • nkpacket
  • fusco
  • exometer_core

Testing on CircleCI is going to be a ton faster than locally 😛

@codecov
Copy link

codecov bot commented Oct 16, 2019

Codecov Report

Merging #2494 into master will increase coverage by 0.01%.
The diff coverage is 13.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2494      +/-   ##
==========================================
+ Coverage   18.07%   18.09%   +0.01%     
==========================================
  Files         340      340              
  Lines       29369    29329      -40     
==========================================
- Hits         5309     5307       -2     
+ Misses      24060    24022      -38
Impacted Files Coverage Δ
src/wpool/mongoose_wpool.erl 59.57% <ø> (+0.62%) ⬆️
src/ejabberd_ctl.erl 0.64% <ø> (ø) ⬆️
src/pubsub/mod_pubsub.erl 0% <ø> (ø) ⬆️
src/gen_iq_handler.erl 29.54% <ø> (ø) ⬆️
src/mongoose_iq.erl 65.38% <ø> (+2.42%) ⬆️
src/mod_roster.erl 21.49% <ø> (+0.05%) ⬆️
src/mongoose_api_admin.erl 75.43% <ø> (ø) ⬆️
src/mongoose_commands.erl 93.1% <ø> (ø) ⬆️
src/mam/mod_mam_rdbms_arch.erl 0% <ø> (ø) ⬆️
src/mongoose_api_common.erl 73.59% <ø> (+0.94%) ⬆️
... and 28 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52a84bc...2c3d061. Read the comment docs.

@mongoose-im

This comment has been minimized.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Oct 17, 2019

7331.1 / Erlang 22.0 / small_tests / faa861a
Reports root / small


7331.2 / Erlang 22.0 / internal_mnesia / faa861a
Reports root/ big
OK: 1267 / Failed: 0 / User-skipped: 136 / Auto-skipped: 0


7331.3 / Erlang 22.0 / odbc_mssql_mnesia / faa861a
Reports root/ big
OK: 3181 / Failed: 0 / User-skipped: 262 / Auto-skipped: 0


7331.4 / Erlang 22.0 / mysql_redis / faa861a
Reports root/ big
OK: 3176 / Failed: 0 / User-skipped: 267 / Auto-skipped: 0


7331.7 / Erlang 22.0 / elasticsearch_and_cassandra_mnesia / faa861a
Reports root/ big
OK: 514 / Failed: 0 / User-skipped: 32 / Auto-skipped: 0


7331.5 / Erlang 22.0 / riak_mnesia / faa861a
Reports root/ big
OK: 1493 / Failed: 0 / User-skipped: 145 / Auto-skipped: 0


7331.6 / Erlang 22.0 / ldap_mnesia / faa861a
Reports root/ big
OK: 1236 / Failed: 0 / User-skipped: 167 / Auto-skipped: 0


7331.9 / Erlang 21.3 / pgsql_mnesia / faa861a
Reports root/ big / small
OK: 3194 / Failed: 0 / User-skipped: 249 / Auto-skipped: 0

Copy link
Contributor

@michalwski michalwski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the effort! This was quick :) I have only one cosmetic comment to the code. Also there is a small inconsistency in the way variable containing the stack trace is called. Sometimes it's Stacktrace and sometimes StackTrace. Do you think this naming can be made consistent or is there a reason to have both variants?

"reason=~p:~p stacktrace=~1000p",
[Class, Other, Stacktrace]),
{{'EXIT', Other},Stacktrace}
end,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A cosmetic thing. I think readability of this block could be improved a bit by moving they try ... catch clause to a dedicated function like apply_transaction_function. What do you think?

@mongoose-im
Copy link
Collaborator

mongoose-im commented Oct 17, 2019

7333.1 / Erlang 22.0 / small_tests / 8a8a103
Reports root / small


7333.2 / Erlang 22.0 / internal_mnesia / 8a8a103
Reports root/ big
OK: 1267 / Failed: 0 / User-skipped: 136 / Auto-skipped: 0


7333.3 / Erlang 22.0 / odbc_mssql_mnesia / 8a8a103
Reports root/ big
OK: 3181 / Failed: 0 / User-skipped: 262 / Auto-skipped: 0


7333.4 / Erlang 22.0 / mysql_redis / 8a8a103
Reports root/ big
OK: 3176 / Failed: 0 / User-skipped: 267 / Auto-skipped: 0


7333.5 / Erlang 22.0 / riak_mnesia / 8a8a103
Reports root/ big
OK: 1493 / Failed: 0 / User-skipped: 145 / Auto-skipped: 0


7333.7 / Erlang 22.0 / elasticsearch_and_cassandra_mnesia / 8a8a103
Reports root/ big
OK: 514 / Failed: 0 / User-skipped: 32 / Auto-skipped: 0


7333.6 / Erlang 22.0 / ldap_mnesia / 8a8a103
Reports root/ big
OK: 1236 / Failed: 0 / User-skipped: 167 / Auto-skipped: 0


7333.9 / Erlang 21.3 / pgsql_mnesia / 8a8a103
Reports root/ big / small
OK: 3194 / Failed: 0 / User-skipped: 249 / Auto-skipped: 0

@NelsonVides
Copy link
Collaborator Author

NelsonVides commented Oct 17, 2019

@michalwski

Thanks for the effort! This was quick :) I have only one cosmetic comment to the code. Also there is a small inconsistency in the way variable containing the stack trace is called. Sometimes it's Stacktrace and sometimes StackTrace. Do you think this naming can be made consistent or is there a reason to have both variants?

I thought the same while doing this, but I pretty much followed the style of the code already present. Sometimes we had pattern matching against C:R and sometimes against Class:Reason, sometimes the stacktrace was called StackTrace and some others it was Stacktrace... I didn't know against which to unify. But I'm gonna try StackTrace just for the fact that that is actually two glued words and not one alone. I can easily grep over that together with the cosmetic comment 🙂

@mongoose-im
Copy link
Collaborator

mongoose-im commented Oct 17, 2019

7334.1 / Erlang 22.0 / small_tests / a3ddf3b
Reports root / small


7334.2 / Erlang 22.0 / internal_mnesia / a3ddf3b
Reports root/ big
OK: 1267 / Failed: 0 / User-skipped: 136 / Auto-skipped: 0


7334.3 / Erlang 22.0 / odbc_mssql_mnesia / a3ddf3b
Reports root/ big
OK: 2484 / Failed: 0 / User-skipped: 199 / Auto-skipped: 0


7334.4 / Erlang 22.0 / mysql_redis / a3ddf3b
Reports root/ big
OK: 2479 / Failed: 0 / User-skipped: 204 / Auto-skipped: 0


7334.7 / Erlang 22.0 / elasticsearch_and_cassandra_mnesia / a3ddf3b
Reports root/ big
OK: 328 / Failed: 0 / User-skipped: 28 / Auto-skipped: 0


7334.5 / Erlang 22.0 / riak_mnesia / a3ddf3b
Reports root/ big
OK: 1398 / Failed: 0 / User-skipped: 145 / Auto-skipped: 0


7334.6 / Erlang 22.0 / ldap_mnesia / a3ddf3b
Reports root/ big
OK: 1236 / Failed: 0 / User-skipped: 167 / Auto-skipped: 0


7334.9 / Erlang 21.3 / pgsql_mnesia / a3ddf3b
Reports root/ big / small
OK: 2497 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0

Also unify the stacktrace variable naming to `StackTrace`, with
camelcase, for the fact that this is actually a two-words variable.
This applies only on the case when we pattern-match against
`Class:Reason:StackTrace`. The other option is against `C:R:S`. This
style was preserved as it was.
@michalwski michalwski merged commit 4a3a558 into master Oct 17, 2019
@michalwski michalwski deleted the get_stacktrace branch October 17, 2019 10:50
@michalwski michalwski added this to the 3.6.0 milestone Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants