-
Notifications
You must be signed in to change notification settings - Fork 19
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
onlyoffice rework #650
onlyoffice rework #650
Conversation
didn't work, and no real point
279694a
to
e2ec557
Compare
e2ec557
to
630d266
Compare
...c/core/platform/services/database/services/orm/connectors/postgres/postgres-query-builder.ts
Show resolved
Hide resolved
getPluginKeyStatus: (key: string) => Promise<ApplicationEditingKeyStatus>; | ||
}, | ||
attemptCount = 8, | ||
tarpitS = 1, |
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.
tarpit?? reviewing you prs is always an English lesson for me
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.
const swapResult = await provider.atomicSet(newKey, null); | ||
logger.debug(`Begin edit try ${newKey}, got: ${JSON.stringify(swapResult)}`); | ||
if (swapResult.didSet) return newKey; | ||
if (!swapResult.currentValue) continue; // glitch in the matrix but ok because atomicCompareAndSet is not actually completely atomic |
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.
Why it's not completely atomic?
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.
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.
oh yeah, it's a current value that is not atomic at all
const userIdBuffer = UUIDTools.bufferFromUUIDString(userId) as unknown as Uint8Array; | ||
const companyIdBuffer = UUIDTools.bufferFromUUIDString(companyId) as unknown as Uint8Array; | ||
const entropyBuffer = UUIDTools.bufferFromUUIDString(randomUUID()) as unknown as Uint8Array; | ||
const idsString = OnlyOfficeSafeDocKeyBase64.fromBuffer( |
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.
and also why do we need all this tricky conversions, uuid to hex, and then back to uuid?
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.
Just using strings with available chars would be bigger than OO allows for key formats. Also because I want editing_session_keys to be sortable by timestamp lexicographically so we can batch work on the older ones
#525 #515 #548 #523
This is a rewrite to have a more robust connexion with only office, recovering forgotten files, handling editing sessions as global locks, that kind