Skip to content

Concurrency Bug in Alexol #8

@Losk-x

Description

@Losk-x

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions