Skip to content

Comments

fix(selectivity): remove multi-thread hashes protection#1191

Merged
KuznetsovRoman merged 1 commit intomasterfrom
INFRADUTY-29746.selectivity_write_hashes_without_lock
Jan 16, 2026
Merged

fix(selectivity): remove multi-thread hashes protection#1191
KuznetsovRoman merged 1 commit intomasterfrom
INFRADUTY-29746.selectivity_write_hashes_without_lock

Conversation

@KuznetsovRoman
Copy link
Member

No description provided.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 16, 2026

Open in StackBlitz

npm i https://pkg.pr.new/gemini-testing/testplane@1191

commit: 62dbebe

markAsCommited(updatedFiles, this._stagedFileHashes);
} catch (err) {
await releaseLock();
await writeJsonWithCompression(this._selectivityHashesPath, existingHashesContent, this._compresion);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • It existed in order to protect "hashes.json" file from writing from multiple concurrent threads (when it was the case)
  • It is HashWriter.commit method
  • Its only used in "updateSelectivityHashes" function
  • "updateSelectivityHashes" is only run in src/testplane.ts in master
  • So, we dont need this lock

...Object.values(this._stagedPatternHashes),
]);

const releaseLock = await lockfile.lock(this._selectivityHashesPath, {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only removed this line and "releaseLock" usage

@KuznetsovRoman KuznetsovRoman merged commit 75ee712 into master Jan 16, 2026
6 of 7 checks passed
@KuznetsovRoman KuznetsovRoman deleted the INFRADUTY-29746.selectivity_write_hashes_without_lock branch January 16, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants