(Use box_big/tarantool.cfg to define space 16 indexes)

** Changed in: tarantool
   Importance: Undecided => Critical

** Changed in: tarantool
     Assignee: (unassigned) => Kostja Osipov (kostja)

** Changed in: tarantool
    Milestone: None => 1.4.8

** Changed in: tarantool
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Tarantool
Development Team, which is subscribed to tarantool.
https://bugs.launchpad.net/bugs/1051006

Title:
  Tree iterators return garbage if an index is modified between calls

Status in Tarantool - an efficient in-memory data store:
  Confirmed

Bug description:
  Tree iterator is not invalidated by deletion from an index:

  localhost> lua box.space[16]:insert('a', 'a', 'a')
  ---
   - 'a': {'a', 'a'}
  ...
  localhost> lua box.space[16]:insert('b', 'b', 'b')
  ---
   - 'b': {'b', 'b'}
  ...
  localhost> lua box.space[16]:insert('c', 'c', 'c')
  ---
   - 'c': {'c', 'c'}
  ...
  localhost> lua box.space[16]:insert('d', 'd', 'd')
  ---
   - 'd': {'d', 'd'}
  ...
  localhost> lua box.space[16]:insert('e', 'e', 'e')
  ---
   - 'e': {'e', 'e'}
  ...
  localhost> lua k,v = box.space[16].index[1]:next(k)
  ---
  ...
  localhost> lua print(k, " ", v)
  ---
  userdata: 0x41544568 'a': {'a', 'a'}
  ...
  localhost> lua k,v = box.space[16].index[1]:next(k)
  ---
  ...
  localhost> lua print(k, " ", v)
  ---
  userdata: 0x41544568 'b': {'b', 'b'}
  ...
  localhost> lua  box.space[16]:truncate()
  ---
  ...
  localhost> lua print(k, " ", v)
  ---
  userdata: 0x41544568 'b': {'b', 'b'}
  ...
  localhost> lua collectgarbage('collect')
  ---
   - 0
  ...
  localhost> lua print(k, " ", v)
  ---
  userdata: 0x41544568 'b': {'b', 'b'}
  ...
  localhost> lua k,v = box.space[16].index[1]:next(k)
  ---
  ...
  localhost> lua print(k, " ", v)
  ---
  userdata: 0x41544568 'c': {'c', 'c'}
  ...
  localhost> lua collectgarbage('collect')
  ---
   - 0
  ...
  localhost> lua print(k, " ", v)
  ---
  userdata: 0x41544568 'c': {'c', 'c'}
  ...
  localhost> lua k,v = box.space[16].index[1]:next(k)
  ---
  ...
  localhost> lua print(k, " ", v)
  ---
  userdata: 0x41544568 'd': {'d', 'd'}
  ...
  localhost> lua k,v = box.space[16].index[1]:next(k)
  ---
  ...
  localhost> lua print(k, " ", v)
  ---
  userdata: 0x41544568 'e': {'e', 'e'}
  ...
  localhost> lua k,v = box.space[16].index[1]:next(k)
  ---
  ...
  localhost> lua print(k, " ", v)
  ---
  nil nil
  ...
  localhost> quit

To manage notifications about this bug go to:
https://bugs.launchpad.net/tarantool/+bug/1051006/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~tarantool-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~tarantool-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to