basho / riak_core

Distributed systems infrastructure used by Riak.
Apache License 2.0
1.23k stars 392 forks source link

Fix dbg:stop_clear/0 is deprecated and will be removed in OTP 27; #1014

Open asyncmind0 opened 6 months ago

asyncmind0 commented 6 months ago
martinsumner commented 6 months ago

The function dbg:stop changed OTP 24 -> OTP 25 to make it the same as dbg:stop_clear/0, but in OTP 24 the two functions still have different behaviour:

https://www.erlang.org/docs/24/man/dbg#stop-0 https://www.erlang.org/docs/24/man/dbg#stop_clear-0 https://www.erlang.org/docs/25/man/dbg#stop-0

So to implement this changeI think you need to check the OTP_RELEASE and do stop if OTP_RELEASE >= 25, and stop_clear otherwise.

There's a question over whether we should just remove riak_core_tracer altogether. I don't think it is used anywhere other than riak_kv_get_fsm. @nsaadouni @tburghart - do either of your teams make use of this riak_core_tracer?