orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

Elliminate constant acquisition of state lock in storage during storage operations

Open andrii0lomakin opened this issue 1 year ago • 1 comments

Currently, every operation in storage requires the acquisition of a storage state lock that leads to a slowdown during the execution of queries. But we can avoid that by moving the execution of the query underneath the storage. The idea is simple: we already have mechanics that allow us to replace storage instances for the current session in the database.

So before the execution of the query, we acquire state lock. Then, we replace storage with the internal class with the same interface that provides access to storage methods without acquiring a state lock.

That is relatively quick to implement and will bring improvements in the speed of query execution.

andrii0lomakin avatar Jan 28 '24 10:01 andrii0lomakin

We can implement this for all non-DDL queries.

andrii0lomakin avatar Jan 28 '24 12:01 andrii0lomakin