Badly-defined behavior calling `put` reusing existing key.
- Dominant language
- Python
- Stars
- 142
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
The current behavior seems to be replacing the value of the key, but increases total_bytes without retiring the existing item.
I do not think this behavior is well defined. It causes total_bytes and available_bytes to diverge, and eventually triggers #15.
How unique do we expect the keys to be?
Shall we raise an exception if the key same key is used twice, or shall we consistently retire the existing key/value when the same key is reused?
Contributor guide
Research direction
Start by reproducing a repeated put with the same key and inspect how total_bytes and available_bytes are updated. Review issue #15 and compare the two proposed behaviors—rejecting duplicate keys or retiring the existing value—then establish which invariant and outcome should define done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100