Skip to content

Commit

Permalink
avoid context leakage in start() method
Browse files Browse the repository at this point in the history
  • Loading branch information
Sladuca committed Sep 2, 2023
1 parent 5baf719 commit ba9d6e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions actors/insertion-writer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ export class InsertionWriter {
}

async start(queryThrottleMs?: number): Promise<ActorHandle> {
const logTip = (await this.insertionLog.getTip()) ?? "0-0";
const logTip = await this.insertionLog.getTip();
this.logger.debug(`current log tip: ${logTip}`);

const logTipMerkleIndex = merkleIndexFromRedisStreamId(logTip);
const logTipMerkleIndex = logTip
? merkleIndexFromRedisStreamId(logTip)
: undefined;
this.logger.debug("starting iterator");
const newInsertionBatches = this.adapter.iterInsertions(
logTipMerkleIndex ?? 0,
Expand Down

0 comments on commit ba9d6e9

Please sign in to comment.