Mayil-AI-Sandbox / kuzudb_jan15

MIT License
0 stars 0 forks source link

Per-index Memfile Locking Contention (hashtag2626) #59

Open vikramsubramanian opened 7 months ago

vikramsubramanian commented 7 months ago

After hashtag2615, we lock a shared in-memory file for string keys in the hash index. Though this works, it is likely (?) a point of contention when strings are long. As mentioned in [this comment]( one solution is to let each thread grab a page at a time. )

mayil-ai[bot] commented 7 months ago

We're not sure how to solve this one.

but here are some ideas that might help you get started -

Summary: Locking contention issue with shared in-memory file for string keys in the hash index.

Possible Solution

Based on the provided information and code snippets, the following solution can be implemented to address the contention issue with long strings in the shared in-memory file:

By implementing these changes, each thread will be able to grab and lock only the pages it needs, reducing contention and potentially improving the performance of the system when dealing with long strings.

Code snippets to check