Skip to content

Commit 5d80d07

Browse files
committed
handle smigrating
smigrating notification should effect in increased command and socket timeout for the given connection
1 parent 7c419e0 commit 5d80d07

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/client/lib/client/enterprise-maintenance-manager.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const PN = {
2020
MIGRATED: "MIGRATED",
2121
FAILING_OVER: "FAILING_OVER",
2222
FAILED_OVER: "FAILED_OVER",
23+
SMIGRATING: "SMIGRATING",
2324
};
2425

2526
export type DiagnosticsEvent = {
@@ -128,7 +129,7 @@ export default class EnterpriseMaintenanceManager {
128129
#onPush = (push: Array<any>): boolean => {
129130
dbgMaintenance("ONPUSH:", push.map(String));
130131

131-
if (!Array.isArray(push) || !["MOVING", "MIGRATING", "MIGRATED", "FAILING_OVER", "FAILED_OVER"].includes(String(push[0]))) {
132+
if (!Array.isArray(push) || !Object.values(PN).includes(String(push[0]))) {
132133
return false;
133134
}
134135

@@ -152,8 +153,9 @@ export default class EnterpriseMaintenanceManager {
152153
return true;
153154
}
154155
case PN.MIGRATING:
156+
case PN.SMIGRATING:
155157
case PN.FAILING_OVER: {
156-
dbgMaintenance("Received MIGRATING|FAILING_OVER");
158+
dbgMaintenance("Received MIGRATING|SMIGRATING|FAILING_OVER");
157159
this.#onMigrating();
158160
return true;
159161
}

0 commit comments

Comments
 (0)