-
Type:
Task
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
During the CSOT implementation in CSFLE, as referenced in JAVA-4055, we encountered challenges with resetting maxTimeMS in CryptConnection for commands that are already encrypted. This issue is primarily due to the use of RawBsonCommand to enhance performance. The conversion of RawBsonCommand back to BsonCommand for adjusting maxTimeMS is considered inefficient and suboptimal for performance.
Challenges:
- Performance: The reliance on RawBsonCommand for performance reasons complicates the resetting of maxTimeMS on encrypted commands.
- Duplication of logic: Tailable cursors may use maxTimeMS as maxAwaitTimeMS when timeoutMS is specified, that requires a check for the cursor type in CryptConnection—a check that has already been performed in the Operation layer. This results in duplicative logic for determining cursor type and setting maxTimeMS in both layers. However, the redundancy is minimal.
Proposed Solution: Move the setting of maxTimeMs to the centralized lowest level, specifically to CommandMessage.
Acceptance criteria:
TBD