You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When carry on operations (write, flush etc.) on one table, a specific worker should be chosen. However, the logic for choosing such a worker distributes across the codebase:
could I ? I want add a function in sst_util.rs pub fn find_worker(table_id: usize, worker_num: usize) -> usize { table_id % worker_num }
replace the three lines you mentioned. if find_worker(table_id, worker_num) != worker_id {
@QuintinTao Thanks. Any contributions are welcome. The proposal is nice, and is it better to put the function find_worker in writer_worker.rs?
Describe This Problem
When carry on operations (write, flush etc.) on one table, a specific worker should be chosen. However, the logic for choosing such a worker distributes across the codebase:
https://github.com/CeresDB/ceresdb/blob/ccf988f5629436927479721b63df53b220967160/analytic_engine/src/instance/write_worker.rs#L307
https://github.com/CeresDB/ceresdb/blob/ccf988f5629436927479721b63df53b220967160/analytic_engine/src/instance/write_worker.rs#L669
https://github.com/CeresDB/ceresdb/blob/ccf988f5629436927479721b63df53b220967160/analytic_engine/src/table/data.rs#L541
Proposal
We hope the logic of choosing the worker for a specific table should be centralized in one place (one function).
Additional Context
No response
The text was updated successfully, but these errors were encountered: