OpenMPDK / KVSSD

KV SSD host software including APIs and drivers
Other
230 stars 55 forks source link

[KV API] About closing iterator when test is done #14

Closed terrafin closed 5 years ago

terrafin commented 5 years ago

When testing / running benchmark for KVSSD(using KDD) with iterator is done, does it automatically closes all iterators, even when the program doesn't terminates normally - rising error(i.e. KVS_ERR_SYS_IO, etc)?

kvssd-support commented 5 years ago

API: kvs_close_iterator_all(kvs_container_handle cont_hd), this will close all opened iterators in case an iterator is not closed properly during last run. Currently it is only supported in SPDK (udd) driver. Will add this to KDD soon .

terrafin commented 5 years ago

First of all, thank you for the explanation. Actually, I asked the question because I'm facing the situation that once KVS_ERR_ITERATOR_OPEN error rises, it rises over and over again in every trial of running benchmark / testing, while using KDD. (The mentioned error started to rise after abnormal termination of kv_bench, caused by KVS_ERR_SYS_IO after opening iterator. Please check issue #11 for more information.) Now, my solution for this problem is, to recompile and reinstall the kernel driver. According to your answer, it seems that there is no solution/automatic recovery using KV API functions for this situation now - am I right? If not, are there any available solutions for this, using KV API functions?

kvssd-support commented 5 years ago

To resolve this issue, try following options:

a) For testing purpose, bitmask (by default set to '0xffff0000') can be changed under file 'KVSSD/application/kvbench/wrappers/couch_kv.cc" and recompile 'kv_bench' application. This should get rid of KVS_ERR_ITERATOR_OPEN error

b) Use KV API 'kvs_close_iterator_all' - this will close all opened iterators in case an iterator is not closed properly during last run. Tried adding the KVAPI under the Sample_code (core/sample_code/test_async.cpp) and attempt to close iterator by running the "sample_code" if there any already open iterator using SPDK driver.

kvssd-support commented 5 years ago

Hope this issue can be closed as KVS_ERR_ITERATOR_OPEN error is not any more reproducible.

kvssd-support commented 5 years ago

Closing this issue.