gre4index / GRE

GRE is a benchmark suite to compare learned indexes and traditional indexes.
45 stars 22 forks source link

Concurrency Bug in Alexol #8

Open Losk-x opened 8 months ago

Losk-x commented 8 months ago

Reproduce the bug:

deadlock when running:

./build/microbench \ --keys_file=./datasets/covid \ --keys_file_type=binary \ --read=0.7 --insert=0.2 \ --scan=0.1 \ --operations_num=200000000 \ --table_size=-1 \ --init_table_ratio=0.5 \ --thread_num=32 \ --index=alexol

The cause of the bug (I guess):

thread 1 insert and trigger resize/split in node A. (it will be deleted then, so the lock of node A will never release) thread 2 scan node A (waiting for the lock releasing and keep retry)

A Solution?

additional "deleted" flag to indicate the node is deleted, the scan should retravel from the root.

00yyyyyyyd commented 1 week ago

I encountered a similar issue with a deadlock when running concurrent operations on the alexol index. Have you found a solution to this problem?