From 57b7c45f25f75c6e90b4c9671ee9764286abf51e Mon Sep 17 00:00:00 2001 From: Jay Doane Date: Wed, 10 May 2023 11:44:52 -0700 Subject: More explicit minor_version for term_to_binary This fixes some more tests --- src/couch_replicator/src/couch_replicator_ids.erl | 2 +- src/mem3/src/mem3_hash.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/couch_replicator/src/couch_replicator_ids.erl b/src/couch_replicator/src/couch_replicator_ids.erl index 86fe1f26e..223f52861 100644 --- a/src/couch_replicator/src/couch_replicator_ids.erl +++ b/src/couch_replicator/src/couch_replicator_ids.erl @@ -120,7 +120,7 @@ maybe_append_filters( true -> [<<"winning_revs_only">>] end, - couch_util:to_hex(couch_hash:md5_hash(term_to_binary(Base3))). + couch_util:to_hex(couch_hash:md5_hash(term_to_binary(Base3, [{minor_version, 1}]))). maybe_append_options(Options, RepOptions) -> lists:foldl( diff --git a/src/mem3/src/mem3_hash.erl b/src/mem3/src/mem3_hash.erl index ccaab7223..0b5402451 100644 --- a/src/mem3/src/mem3_hash.erl +++ b/src/mem3/src/mem3_hash.erl @@ -53,7 +53,7 @@ get_hash_fun(DbName0) when is_binary(DbName0) -> crc32(Item) when is_binary(Item) -> erlang:crc32(Item); crc32(Item) -> - erlang:crc32(term_to_binary(Item)). + erlang:crc32(term_to_binary(Item, [{minor_version, 1}])). get_hash_fun_int(Opts) when is_list(Opts) -> case lists:keyfind(hash, 1, Opts) of -- cgit v1.2.1