Public bug reported:

box.truncate() hangs forever with 100% CPU usage when primary key is not
at field 0.

Example:

slab_alloc_arena = 0.1

pid_file = "box.pid"

primary_port = 33013
secondary_port = 33014
admin_port = 33015

space[0].enabled = 1
#namespace[0].expire_field = 2

space[0].index[0].type = "TREE"
space[0].index[0].unique = 1
space[0].index[0].key_field[0].type = "NUM"
space[0].index[0].key_field[0].fieldno = 1

kostja@atlas:~$ cat foo.log 
insert into t0 values (1, 0)
insert into t0 values (1, -1)
insert into t0 values (1, 1)
insert into t0 values (1, 2)
insert into t0 values (1, -2)
insert into t0 values (1, 3)
insert into t0 values (1, -3)
insert into t0 values (1, 4)
insert into t0 values (1, -4)
lua box.space[0]:truncate()
kostja@atlas:~$ tarantool < foo.log

** Affects: tarantool
     Importance: Medium
         Status: Confirmed

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

** 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/1042798

Title:
  Truncate hangs when primary key is not in linear or starts at the
  first field

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

Bug description:
  box.truncate() hangs forever with 100% CPU usage when primary key is
  not at field 0.

  Example:

  slab_alloc_arena = 0.1

  pid_file = "box.pid"

  primary_port = 33013
  secondary_port = 33014
  admin_port = 33015

  space[0].enabled = 1
  #namespace[0].expire_field = 2

  space[0].index[0].type = "TREE"
  space[0].index[0].unique = 1
  space[0].index[0].key_field[0].type = "NUM"
  space[0].index[0].key_field[0].fieldno = 1

  kostja@atlas:~$ cat foo.log 
  insert into t0 values (1, 0)
  insert into t0 values (1, -1)
  insert into t0 values (1, 1)
  insert into t0 values (1, 2)
  insert into t0 values (1, -2)
  insert into t0 values (1, 3)
  insert into t0 values (1, -3)
  insert into t0 values (1, 4)
  insert into t0 values (1, -4)
  lua box.space[0]:truncate()
  kostja@atlas:~$ tarantool < foo.log

To manage notifications about this bug go to:
https://bugs.launchpad.net/tarantool/+bug/1042798/+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