Use backwards compatible term_to_binary (#408)

* Use backwards compatible term_to_binary

So that where we have hashed term_to_binary output in OTP25 or earlier, that has will be matched in OTP 26.

* Test reliability

If all keys are put in order, the max_slots may not be used, as the driver at L0 is penciller cache size, and merge to new files (managed by the parameter) only occurs when there are overlapping files the level below
This commit is contained in:
Martin Sumner 2023-10-05 10:33:20 +01:00 committed by GitHub
parent c4a32366df
commit b96518c32a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 16 deletions

View file

@ -202,7 +202,7 @@ headkey_to_canonicalbinary({?HEAD_TAG, {BucketType, Bucket}, Key, SubKey})
headkey_to_canonicalbinary(Key) when element(1, Key) == ?HEAD_TAG ->
% In unit tests head specs can have non-binary keys, so handle
% this through hashing the whole key
term_to_binary(Key).
leveled_util:t2b(Key).
-spec to_lookup(ledger_key()) -> maybe_lookup().