3

I'm using the Tokyo Cabinet database through the PyTyrant module, storing the data in a hash table (*.tch file). When the file reaches 65 GB in size, the following bug occurs: when a new entry is added to the database, querying the new key gives a "no such key error". However, the new key is listed when I query for a list of all keys. Furthermore, the problematic entries cannot be deleted from the table.

Can anyone explain this?

EDIT: output of 'tcrmgr inform -st -port 1978 localhost' immediately before the error:

version 1.1.40
libver  323
protver 0.91
os  Linux
time    1397633010.989177
pid 25308
sid 0
type    hash
path    tmp.tch
rnum    1104
size    68721564032
bigend  0
fd  8
loadavg 1.630000
memsize 153833472
memrss  2265088
ru_real 3272.949521
cnt_put 1105
cnt_putkeep 0
cnt_putcat  0
cnt_putshl  0
cnt_putnr   0
cnt_out 0
cnt_get 1166
cnt_mget    0
cnt_vsiz    2
cnt_iterinit    5
cnt_iternext    680
cnt_fwmkeys 0
cnt_addint  0
cnt_adddouble   0
cnt_ext 0
cnt_sync    0
cnt_optimize    0
cnt_vanish  0
cnt_copy    0
cnt_restore 0
cnt_setmst  0
cnt_rnum    102
cnt_size    0
cnt_stat    884
cnt_misc    0
cnt_repl    0
cnt_put_miss    0
cnt_out_miss    0
cnt_get_miss    2

and after adding another record, which makes the error appear:

version 1.1.40
libver  323
protver 0.91
os  Linux
time    1397633011.102457
pid 25308
sid 0
type    hash
path    tmp.tch
rnum    1105
size    68731564064
fatal   22: no record found
bigend  0
fd  8
loadavg 1.630000
memsize 153833472
memrss  2265088
ru_real 3273.062801
cnt_put 1106
cnt_putkeep 0
cnt_putcat  0
cnt_putshl  0
cnt_putnr   0
cnt_out 0
cnt_get 1167
cnt_mget    0
cnt_vsiz    2
cnt_iterinit    5
cnt_iternext    680
cnt_fwmkeys 0
cnt_addint  0
cnt_adddouble   0
cnt_ext 0
cnt_sync    0
cnt_optimize    0
cnt_vanish  0
cnt_copy    0
cnt_restore 0
cnt_setmst  0
cnt_rnum    102
cnt_size    0
cnt_stat    885
cnt_misc    0
cnt_repl    0
cnt_put_miss    0
cnt_out_miss    0
cnt_get_miss    3
laurt
  • 1,811
  • 3
  • 15
  • 18
  • Could you please add some more details like: file system, tokyocabinet version, 'tchmgr inform' output just before the error and afterwards? – Sven Apr 15 '14 at 08:16
  • File system is ext4, Tyrant version 1.1.40-4.1build1. The output of 'tchmgr inform -st' (after the error) contains the line "fatal 6: invalid record header". – laurt Apr 15 '14 at 16:35
  • I have added tcrmgr inform outputs before and afther the error as requested. – laurt Apr 16 '14 at 07:30
  • I'm not sure of the Tokyo Cabinet version, but I have the latest version of the tokyotyrant APT package, which has Tyrant version 1.1.40. – laurt Apr 16 '14 at 07:37
  • 1
    The file size just crossed 64 GiB. I would check all components for such a limit. - tch is safe till 8 EiB. - If your ext4 block size is 4k, the file system cannot cause the problem. Remaining suspects: tokyotyrant (try directly via tokyocabinet), Python bindings (try C calls), ... – Sven Apr 16 '14 at 07:39
  • You seem to have only a thousand key-value pairs? So the values (or the keys or both) must be huge. Could the last inserted pair hit some maximal size? – Sven Apr 16 '14 at 07:48
  • I tested with huge values in order to fill up the 65GB quickly, but the same problem occurs with shorter values (~4 million key-value pairs), on two different machines. – laurt Apr 16 '14 at 08:58
  • I see; you tested with different data sets. So, at least the 3 suspects from above remain (block size of ext4, PyTyrant, tokyotyrant) before we should look into tokyocabinet itself. – Sven Apr 17 '14 at 07:33
  • The problem was solved for the time being by replacing tch with tcb, but the reason for the original problem is still unclear. – laurt Apr 21 '14 at 13:37
  • @laurt I am having the same problem. How did you replace tch with tcb? – Daniel Cukier Jan 30 '15 at 15:34

0 Answers0