Column: Test and document behaviour for auto-incrementing IDs #64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wrote this test to better understand how Column keys are supposed to work in case of gaps and removals. Turns out a key is never re-used. This limited the number of elements that can ever be created to the uint32 range, even if elements are consistently removed.
A typical use case for such a column would be logs. For all the things that happen, a new line is added. Some are cleared later on for cleanup purposes. I.e. there can be cases with significantly more row creations than number of elements over the lifetime of the container.
I don't think there is anything wrong with the above behaviour. It's nice and clean if well understood. But I am wondering if hardcoding a limit of 4 billion row creations is enough.