Skip to content

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

@mcesaro

Description

@mcesaro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions