JackieTien97 opened a new pull request, #16210: URL: https://github.com/apache/iotdb/pull/16210
This pull request introduces support for configurable read consistency levels in IoTDB, allowing the system to switch between strong and weak consistency modes. The changes include adding a new `ReadConsistencyLevel` enum, updating configuration files and classes to use this enum, and refactoring planner logic to leverage the new setting. **Configuration and Consistency Level Support:** * Added a new `ReadConsistencyLevel` enum to represent possible read consistency modes (`STRONG`, `WEAK`). * Updated the `IoTDBConfig` class to use the new `ReadConsistencyLevel` enum instead of a string, including changes to getter/setter methods and default value logic. [[1]](diffhunk://#diff-30d3dc10c256a0068e3b87dd128011b653b4a8ecd0f0bf1149979022b5d92ea7L978-R979) [[2]](diffhunk://#diff-30d3dc10c256a0068e3b87dd128011b653b4a8ecd0f0bf1149979022b5d92ea7L3307-R3317) * Modified configuration files for test environments to set `read_consistency_level=weak`, enabling weak consistency mode for those nodes. [[1]](diffhunk://#diff-4c6d97e10d4292935f4a9b82e3c810397ec920654ad7d795c2a21ed94cac9590R42) [[2]](diffhunk://#diff-0d2d35ba88fb2baa453d97988a7032cf7646e08775c9d64c8796be9f135f1807R42) [[3]](diffhunk://#diff-ea826dc268d7221e6b7f1f423bb38e3bba5be50940ea31d01b920f5e5cb7ed72R42) **Planner and Query Engine Refactoring:** * Refactored the `AbstractFragmentParallelPlanner` to use the new `ReadConsistencyLevel` enum, storing the value at construction and using it to control data node selection logic. [[1]](diffhunk://#diff-d588050d82291dd7d7d979eb03fbe4749fb1fc072cbdf59b04f654af2aa31ae3R25-R29) [[2]](diffhunk://#diff-d588050d82291dd7d7d979eb03fbe4749fb1fc072cbdf59b04f654af2aa31ae3L48-R69) [[3]](diffhunk://#diff-d588050d82291dd7d7d979eb03fbe4749fb1fc072cbdf59b04f654af2aa31ae3L115-R119) * Updated relevant imports and usages in affected classes to support the new configuration, and improved how configuration is accessed in query execution and planning. [[1]](diffhunk://#diff-30d3dc10c256a0068e3b87dd128011b653b4a8ecd0f0bf1149979022b5d92ea7R27) [[2]](diffhunk://#diff-9532a76d303ce6a583b9fc32a897a6ed696bcc6bdfc4fb95f5091fa6b7aeb7ebR23) [[3]](diffhunk://#diff-9532a76d303ce6a583b9fc32a897a6ed696bcc6bdfc4fb95f5091fa6b7aeb7ebR57) [[4]](diffhunk://#diff-9532a76d303ce6a583b9fc32a897a6ed696bcc6bdfc4fb95f5091fa6b7aeb7ebL155-R157) [[5]](diffhunk://#diff-d588050d82291dd7d7d979eb03fbe4749fb1fc072cbdf59b04f654af2aa31ae3L36) These changes collectively make the read consistency level a first-class, type-safe configuration in IoTDB, improving both clarity and flexibility. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
