-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexey Zorkaltsev
committed
Feb 15, 2024
1 parent
3cda548
commit 1c6ad6c
Showing
1 changed file
with
23 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
The rules by which the query service code works: | ||
|
||
- Unlike table-service, a grpc connection is created per endpoint only once, and is reused for all sessions with that endpoint | ||
|
||
- When a new session is created, a grpc stream is created with the attach() command | ||
|
||
- The attach-stream remains open for the entire lifetime of the session, including when it | ||
returns to the pool of free sessions. | ||
|
||
- If attach-stream breaks, the session is considered not reusable. But its current use, if any, is not interrupted. | ||
|
||
- A session can be terminated if the exec method returns an error that the session is broken - same logic as in table-service | ||
|
||
- There is no re-attach mechanism at the moment, but it is possible that it will appear in the future | ||
|
||
- In the first approximation of the service implementation, only the sequential mode of receiving result sets is used | ||
|
||
- It still may be worth to make an experimental mixed mode, since we will have to compare performance anyway | ||
|
||
- Maximize the use of session pool management logic and error handling logic from table-service | ||
|
||
- Data output is impleted via async iterator. Important: Make sure that in all error scenarios, all | ||
Promises that have gotten out and have not yet completed will return reject |