You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* This class is only meant to be constructed within the driver. This constructor is
357
+
* not subject to semantic versioning compatibility guarantees and may change at any time.
358
+
*
359
+
* @public
360
+
**/
361
+
constructor(
362
+
serverDescription: ServerDescription,
363
+
maxSetVersion: number|null,
364
+
maxElectionId: ObjectId|null,
365
+
options?: {cause?: Error}
366
+
){
367
+
super(
368
+
`primary marked stale due to electionId/setVersion mismatch: server setVersion: ${serverDescription.setVersion}, server electionId: ${serverDescription.electionId}, topology setVersion: ${maxSetVersion}, topology electionId: ${maxElectionId}`,
369
+
options
370
+
);
371
+
}
372
+
373
+
overridegetname(): string{
374
+
return'MongoStalePrimaryError';
375
+
}
376
+
}
377
+
343
378
/**
344
379
* An error generated when a batch command is re-executed after one of the commands in the batch
0 commit comments