box.auto_increment counter resets

Bug #1200228 reported by bigbes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tarantool
Fix Released
Critical
Kostja Osipov

Bug Description

When inserting more than 256 keys with box.auto_increment it inserts tuple with repeated first key.
Problem seems to be in index:max() op, that simply takes rightest leaf in the tree.
Problem can be reproduced with:
for i = 1, 1024 do
    box.insert(0, i, i)
    print(box.space[0].index[0].idx:max())
end
Output is:
---
(...)
251: {251}
252: {252}
253: {253}
254: {254}
255: {255}
255: {255}
255: {255}
(...)
255: {255}
255: {255}
511: {511}
511: {511}
(...)
---

bigbes (bigbes)
description: updated
bigbes (bigbes)
Changed in tarantool:
importance: Undecided → Critical
assignee: nobody → Kostja Osipov (kostja)
milestone: none → 1.5.2
status: New → In Progress
bigbes (bigbes)
Changed in tarantool:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.