Skip to content

Commit 854d776

Browse files
committed
WIP: TEMP: Return read after both reads
1 parent 37d4cb9 commit 854d776

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/config/dual-session-store.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export class DualSessionStore extends Store {
3636
{ sid, store: this.primaryLabel },
3737
"Session read from primary"
3838
);
39-
cb(null, primarySession);
4039
}
4140

4241
this.secondary.get(sid, (secondaryErr, secondarySession) => {
@@ -53,14 +52,15 @@ export class DualSessionStore extends Store {
5352
{ err: secondaryErr, sid, store: this.secondaryLabel },
5453
"Secondary consistency check read failed"
5554
);
56-
return;
55+
} else {
56+
logger.info(
57+
{ sid, store: this.secondaryLabel },
58+
"Session read from secondary"
59+
);
60+
this.performConsistencyChecks(primarySession, secondarySession, sid);
5761
}
5862

59-
logger.info(
60-
{ sid, store: this.secondaryLabel },
61-
"Session read from secondary"
62-
);
63-
this.performConsistencyChecks(primarySession, secondarySession, sid);
63+
cb(null, primarySession);
6464
});
6565
});
6666
}

0 commit comments

Comments
 (0)