Skip to content
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

Implementation for resolving data corruption issue for distributed data ordering service #5484

Merged
merged 35 commits into from
Mar 25, 2021
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d09e0c0
Implementation for resolving data corruption for distributed data ord…
jatgarg Mar 11, 2021
bb0e995
merge conflict
jatgarg Mar 15, 2021
6afa05a
Add in loader options
jatgarg Mar 15, 2021
0499496
Add in loader options
jatgarg Mar 15, 2021
15f32db
Expose proper prop
jatgarg Mar 15, 2021
002b907
Expose proper prop
jatgarg Mar 15, 2021
e75b5cd
Fix event
jatgarg Mar 15, 2021
5e3623f
Change promise resolve
jatgarg Mar 15, 2021
d9e9675
set to undefined in case of connected only
jatgarg Mar 18, 2021
a9bd5e5
set to undefined in case of connected only
jatgarg Mar 18, 2021
25d3984
Pr sugg
jatgarg Mar 18, 2021
f03afd3
fix
jatgarg Mar 18, 2021
af8697b
fix
jatgarg Mar 18, 2021
717819d
merge conflict
jatgarg Mar 18, 2021
c018824
fix order
jatgarg Mar 18, 2021
9a6e7b8
set isdirty and add comments
jatgarg Mar 18, 2021
e9b2a47
add space
jatgarg Mar 18, 2021
82fa0c4
fix event
jatgarg Mar 18, 2021
e4232c1
fix event
jatgarg Mar 18, 2021
1e478c8
fix event
jatgarg Mar 18, 2021
68f8db5
fix dirty
jatgarg Mar 18, 2021
571998b
fix dirty
jatgarg Mar 18, 2021
f6dac03
Add basic test
jatgarg Mar 19, 2021
91d8439
Add test and remove promise
jatgarg Mar 19, 2021
3633fc1
add more test
jatgarg Mar 19, 2021
3461bcb
add more test
jatgarg Mar 19, 2021
97f46da
add more test
jatgarg Mar 19, 2021
71297b3
Pr sugg
jatgarg Mar 19, 2021
12ae2d5
Pr sugg
jatgarg Mar 19, 2021
1c85d89
Pr sugg
jatgarg Mar 19, 2021
1420cc5
Pr sugg
jatgarg Mar 19, 2021
93480ee
Make noop on non connected state
jatgarg Mar 24, 2021
ff6d151
pr sugg
jatgarg Mar 24, 2021
17de42e
add some telemetry events
jatgarg Mar 25, 2021
3c76d63
add some telemetry events
jatgarg Mar 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
set to undefined in case of connected only
jatgarg committed Mar 18, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit d9e967554c19a3fe947f031baa9862b123de5442
12 changes: 7 additions & 5 deletions packages/loader/container-loader/src/container.ts
Original file line number Diff line number Diff line change
@@ -1682,9 +1682,6 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i

const oldState = this._connectionState;
this._connectionState = value;
// Set it to undefined in both "Disconnected" and "Connected" case as we only require it in
// transition from "Disconnected" to "Connected" and we cannot come here in "Connecting" event.
this.prevClientLeftP = undefined;

if (value === ConnectionState.Connected) {
// Mark our old client should have left in the quorum if it's still there
@@ -1695,13 +1692,18 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
client.shouldHaveLeft = true;
}
}

// Set it to undefined in "Connected" case as we only require it in transition
// from "Disconnected" to "Connected"
this.prevClientLeftP = undefined;
this._clientId = this.pendingClientId;
} else if (value === ConnectionState.Disconnected) {
// Important as we process our own joinSession message through delta request
this.pendingClientId = undefined;
// Only wait for "leave" message if we have some outstanding ops and the client was write client as
// server would not accept ops from read client.
if (this._deltaManager.shouldJoinWrite() && this.client.mode === "write") {
// server would not accept ops from read client. Also check if the promise is not already set as we
// could receive "Disconnected" event multiple times without getting connected.
if (this._deltaManager.shouldJoinWrite() && this.client.mode === "write" && this.prevClientLeftP !== undefined) {
this.prevClientLeftP = new Deferred();
// Default is 90 sec for which we are going to wait for its own "leave" message.
setTimeout(() => {