-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yatp could not preempt threads #71
Comments
Seems that this is how thread pool is expected to work. It's more appropriate to use std::thread in agatedb, as we need long running threads instead of spawning short-running tasks. |
Can you explain more about "how thread pool is expected to work"? AgateDB should allow sharing global thread pool with other system. |
From yatp source code, it by default spawns a maximum of In agatedb with default configuration, we would have at least 5 concurrent tasks running in the background. If other systems have their thread pool misconfigured (like using |
How about setting a larger capacity? |
If we have 5 threads, and the thread pool always has these 5 threads running, there seems no difference with Anyway, I have put all threads back into yatp, and set |
Setting a larger capacity is to get around the CI issues. In fact, the thread pool should not be created by the library, it should be a builder parameter given by users. It is critical in resource limited environment to have more precise control on threads. |
After introducing MVCC and txn, we now have 3 long-running background threads.
If we put all threads in one thread pool, one of them won't even begin to execute in GitHub Action. Current workaround is to use std::thread for flush and write, and pool for compaction. We may later investigate how to integrate all threads into a thread pool.
The text was updated successfully, but these errors were encountered: