horaedb icon indicating copy to clipboard operation
horaedb copied to clipboard

Centralize the logic of choosing worker for table into one place

Open ShiKaiWi opened this issue 3 years ago • 0 comments

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

ShiKaiWi avatar Sep 23 '22 10:09 ShiKaiWi