Yutaro SHIMAMURA
yu****@irx*****
2015年 12月 13日 (日) 21:39:43 JST
お久しぶりです! ある一つのDBを複数のプロセスで使用している時、 どれか一つのプロセスからtruncateを実行しても他のプロセスから見るとレコードが残り続けるという現象にぶつかりました。 * プロセス1 > table_create tbla TABLE_HASH_KEY ShortText [[0,1450009296.21617,0.0567305088043213],true] > column_create tbla cola COLUMN_SCALAR ShortText [[0,1450009297.84113,0.048534631729126],true] > load --table tbla --values [{\"_key\":\"kv1\",\"cola\":\"stc1\"}] [[0,1450009387.73932,0.000219821929931641],1] > select tbla [[0,1450009393.44995,0.000159502029418945],[[[1],[["_id","UInt32"],["_key","ShortText"],["cola","ShortText"]],[1,"kv1","stc1"]]]] * この状態でプロセス2を起動 > select tbla [[0,1450009397.69844,0.000183820724487305],[[[1],[["_id","UInt32"],["_key","ShortText"],["cola","ShortText"]],[1,"kv1","stc1"]]]] * プロセス1でtruncate > truncate tbla [[0,1450009402.65819,0.112846612930298],true] > select tbla [[0,1450009413.23927,7.53402709960938e-05],[[[0],[["_id","UInt32"],["_key","ShortText"],["cola","ShortText"]]]]] ↑消えてる * プロセス2でselect, unmapやio_flushしてみる > select tbla [[0,1450009418.21568,7.84397125244141e-05],[[[1],[["_id","UInt32"],["_key","ShortText"],["cola","ShortText"]],[1,"kv1","stc1"]]]] ↑残ってる > database_unmap [[0,1450009429.77373,0.00843930244445801],true] > select tbla [[0,1450009433.26145,5.17368316650391e-05],[[[1],[["_id","UInt32"],["_key","ShortText"],["cola","ShortText"]],[1,"kv1","stc1"]]]] > io_flush [[0,1450009599.38242,0.0351345539093018],true] > select tbla [[0,1450009602.99016,5.07831573486328e-05],[[[1],[["_id","UInt32"],["_key","ShortText"],["cola","ShortText"]],[1,"kv1","stc1"]]]] ↑まだいる * プロセス2を抜けてもう一度起こす > quit # groonga test.grn > select tbla [[0,1450009738.21378,0.000265359878540039],[[[0],[["_id","UInt32"],["_key","ShortText"],["cola","ShortText"]]]]] ↑いなくなる 既知の問題で報告かぶってたらすいません! よろしくお願いします。