basho / riak_kv

Riak Key/Value Store
Apache License 2.0
653 stars 233 forks source link

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

Open mcesaro opened 12 months ago

mcesaro commented 12 months ago

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:

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:
```erlang
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.