book_head in head_only mode
Closed this issue · 1 comments
martinsumner commented
In head_only mode, sub_keys are part of the object specs definition. If the head_only mode is also supporting lookup - then those keys (with sub-keys) may also be fetched using book_head.
However book_head/4 only supports [book pid(),bucket binary(),key binary(),tag tag()] as inputs. So how is a head_only object with a sub_key fetched?
This is achieved at the moment by breaking the spec and sending the tuple {key binary(),subkey binary()} as the Key. It would be better to have a book_head/5 to explicitly support this with types correctly being tracked for dialyzer.
martinsumner commented
Implemented book_headonly(book pid(), bucket key(), key key(), sub_key key())