forked from opensearch-project/opensearch-spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce Session Document Retrieval in FintREPL to Enhance Latency Metrics
This PR reduces the frequency of 'getSessionDoc' calls in two places of FintREPL, addressing the correlation between request count and query latency metrics. 1. **Heartbeat Update Optimization**: - Prior to updating the heartbeat, the sequence number and primary term are now obtained for effective concurrency control. - This PR removes the get session doc call and directly updates the last update time and state. 2. **Session Document Retrieval before Statement Processing**: - Previously, in scenarios where a query takes 10 minutes, the 'getSessionDoc' call is limited to once per 10 minutes. However, in idle states with no running queries, the call frequency is run every 100 milliseconds. - This PR reduced the frequency of 'getSessionDoc' calls by ensuring we make the call at least 1 minute after the previous call. **Testing**: - Verified consistent 1-minute intervals for heartbeat updates. - Confirmed the 'getSessionDoc' call executes every 1 minute prior to picking up the next statement. Signed-off-by: Kaituo Li <[email protected]>
- Loading branch information
Showing
3 changed files
with
33 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters