Tree iterators return garbage if an index is modified between calls
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tarantool |
Fix Released
|
Critical
|
Kostja Osipov |
Bug Description
Tree iterator is not invalidated by deletion from an index:
localhost> lua box.space[
---
- 'a': {'a', 'a'}
...
localhost> lua box.space[
---
- 'b': {'b', 'b'}
...
localhost> lua box.space[
---
- 'c': {'c', 'c'}
...
localhost> lua box.space[
---
- 'd': {'d', 'd'}
...
localhost> lua box.space[
---
- 'e': {'e', 'e'}
...
localhost> lua k,v = box.space[
---
...
localhost> lua print(k, " ", v)
---
userdata: 0x41544568 'a': {'a', 'a'}
...
localhost> lua k,v = box.space[
---
...
localhost> lua print(k, " ", v)
---
userdata: 0x41544568 'b': {'b', 'b'}
...
localhost> lua box.space[
---
...
localhost> lua print(k, " ", v)
---
userdata: 0x41544568 'b': {'b', 'b'}
...
localhost> lua collectgarbage(
---
- 0
...
localhost> lua print(k, " ", v)
---
userdata: 0x41544568 'b': {'b', 'b'}
...
localhost> lua k,v = box.space[
---
...
localhost> lua print(k, " ", v)
---
userdata: 0x41544568 'c': {'c', 'c'}
...
localhost> lua collectgarbage(
---
- 0
...
localhost> lua print(k, " ", v)
---
userdata: 0x41544568 'c': {'c', 'c'}
...
localhost> lua k,v = box.space[
---
...
localhost> lua print(k, " ", v)
---
userdata: 0x41544568 'd': {'d', 'd'}
...
localhost> lua k,v = box.space[
---
...
localhost> lua print(k, " ", v)
---
userdata: 0x41544568 'e': {'e', 'e'}
...
localhost> lua k,v = box.space[
---
...
localhost> lua print(k, " ", v)
---
nil nil
...
localhost> quit
Changed in tarantool: | |
status: | Confirmed → Fix Committed |
Changed in tarantool: | |
status: | Fix Committed → Fix Released |
(Use box_big/ tarantool. cfg to define space 16 indexes)