-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ets:insert/2 insert order preserved when list with same keys for bag table #6752
Conversation
CT Test Results 4 files 199 suites 1h 14m 40s ⏱️ For more details on these failures, see this check. Results for commit 5c4f367. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
I pushed a commit with some documentation improvements. |
@sverker makes sense to me 👍 |
After discussion in erlang#6730 Changed `db_term_list_prepend*` to `db_term_list_append*` so values to be stored against a key have their order preserved. Previously due to building the linked list via prepending, the values insert order was reversed from OTP 23 onward.
Describe and warn about lots of objects with same keys in bag and duplicate_bag.
5c4f367
to
d698464
Compare
Expanded the test case to include provoking bug for @madlep Thanks for good report and fix. |
Since OTP 23, when inserting a list of values into an ets
bag
table, values for the same key are inserted in reversed order (prior to OTP 22, they were inserted in the order in the list).Implementing fix suggested by @sverker to build linked list of
DbTerm
values stored against a key by appending (rather than prepending as it had been doing).Fix for #6730 (see description there for code to reproduce + original correct behaviour on OTP 22, and regression behaviour on OTP >= 23)