fix(ds): Fix hashing of empty wildcard topic levels in bitfield_lts
This commit is contained in:
parent
91fd01ed21
commit
b565976794
|
@ -596,7 +596,7 @@ prepare_loop_context(DB, CF, TopicIndex, StartTime, SafeCutoffTime, Varying, Key
|
||||||
fun
|
fun
|
||||||
('+') ->
|
('+') ->
|
||||||
any;
|
any;
|
||||||
(TopicLevel) when is_binary(TopicLevel) ->
|
(TopicLevel) when is_binary(TopicLevel); TopicLevel =:= '' ->
|
||||||
{'=', hash_topic_level(TopicLevel)}
|
{'=', hash_topic_level(TopicLevel)}
|
||||||
end,
|
end,
|
||||||
Varying
|
Varying
|
||||||
|
@ -831,6 +831,8 @@ threshold_fun(0) ->
|
||||||
threshold_fun(_) ->
|
threshold_fun(_) ->
|
||||||
20.
|
20.
|
||||||
|
|
||||||
|
hash_topic_level('') ->
|
||||||
|
hash_topic_level(<<>>);
|
||||||
hash_topic_level(TopicLevel) ->
|
hash_topic_level(TopicLevel) ->
|
||||||
<<Int:64, _/binary>> = erlang:md5(TopicLevel),
|
<<Int:64, _/binary>> = erlang:md5(TopicLevel),
|
||||||
Int.
|
Int.
|
||||||
|
|
Loading…
Reference in New Issue