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

Porting Riak TS to OTP 26 (it applies to Riak KV also) #1884

Open
mcesaro opened this issue Nov 29, 2023 · 0 comments
Open

Porting Riak TS to OTP 26 (it applies to Riak KV also) #1884

mcesaro opened this issue Nov 29, 2023 · 0 comments

Comments

@mcesaro
Copy link

mcesaro commented Nov 29, 2023

I successfully compiled Riak on OTP 26.0 based on the riak_ts-3.0.0 branch available at https://github.com/TI-Tokyo/riak/tree/riak_ts-3.0.0
The process involved:

  • the update of redbug to the latest version {redbug, {git, "https://github.com/massemanet/redbug", {branch, "master"}}} in therebar.config of the riak_kv project;

  • the update of leveled to the latest version (currently the develop-3.1 branch). Note that I wasn't able to build the project using the dependency resolved by rebar3, as the default configuration seems to always checkout a 0.9.*tag of leveled.
    That version won't compile:

leveled_bookie.erl:716:60: type variable 'Key' is only used once (is unbound)

so I had to replace the /src and /include directories with those I got from the forked leveledrepository.

  • in riak_core and riak_kv I replaced the dbg:stop_clear/0 calls with dbg:stop/0

-the following type definitions don't compile:

riak_kv_yessir_backend.erl:275:29: type variable 'Index' is only used once (is unbound)
riak_kv_yessir_backend.erl:275:36: type variable 'SecondaryKey' is only used once (is unbound)

riak_kv_eleveldb_backend.erl:182:29: type variable 'Index' is only used once (is unbound)
riak_kv_eleveldb_backend.erl:182:36: type variable 'SecondaryKey' is only used once (is unbound)

the fix is trivial, I just prepended an underscore to the variable names.

  • last edit was just to fix the following:
http_uri:decode/1 is deprecated and will be removed in OTP 27; use uri_string:unquote function instead

I fixed the deprecation warnings because they are handled with macros inside the source code:

-ifdef(OTP_25).
percent_encode(A) ->
    uri_string:quote(A).
-else.
percent_encode(A) ->
    uri_string:unquote(A).
-endif.

The version check fails on OTP 26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant