-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server Changes in Fluid Server Cluster Discovery Feature #9685
Server Changes in Fluid Server Cluster Discovery Feature #9685
Conversation
# Conflicts: # server/routerlicious/packages/routerlicious-base/src/alfred/routes/api/documents.ts
server/routerlicious/packages/routerlicious-base/src/alfred/routes/api/documents.ts
Outdated
Show resolved
Hide resolved
server/routerlicious/packages/routerlicious-base/src/alfred/routes/api/documents.ts
Outdated
Show resolved
Hide resolved
server/routerlicious/packages/routerlicious-base/src/alfred/routes/api/documents.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tianzhu007, thanks for working on this PR! I just left a few follow-up comments, the most important one related to our discussion regarding caching the summary in historian.
Also, curious: what was your testing strategy after you pushed the changes to address comments? Just want to make sure we test this thoroughly as this is an important change.
Finally, it would be good to get @pradeepvairamani and/or @znewton sign off besides mine before merging just in case I missed something 😄
server/routerlicious/packages/routerlicious-base/src/utils/sessionHelper.ts
Outdated
Show resolved
Hide resolved
server/routerlicious/packages/routerlicious-base/src/utils/sessionHelper.ts
Outdated
Show resolved
Hide resolved
server/routerlicious/packages/routerlicious-base/src/utils/sessionHelper.ts
Outdated
Show resolved
Hide resolved
server/routerlicious/packages/routerlicious-base/src/utils/sessionHelper.ts
Outdated
Show resolved
Hide resolved
Thanks for reviewing it. :) |
To implement server discovery, we need to add the following changes to the server side:
a. Add the session information to the document metadata table on container creation.
b. When the session ends, we will mark the isSessionAlive flag as false in session information in the deli lambda.
- Client A opens a document in the US, generates some ops and closes the session. The final summary with the sequence # 20 is cached.
- Client B then opens the same document and creates a session in the EU, generates some ops, and closes the session. The final summary with the sequence # 30 is cached in EU.
- Client A reopens the document from the US and a new session is created. If we do not disable the cache, client A reads the summary with the summary sequence number of 20 which would be incorrect. Therefore, we need to let client A read the summary directly from the storage, instead of the cache, and update the cache with the fetched summary (sequence number 30).