Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Fix transaction pk violation#22057

Merged
lijunwangs merged 2 commits intosolana-labs:masterfrom
lijunwangs:fix_transaction_pk_violation
Dec 22, 2021
Merged

Fix transaction pk violation#22057
lijunwangs merged 2 commits intosolana-labs:masterfrom
lijunwangs:fix_transaction_pk_violation

Conversation

@lijunwangs
Copy link
Copy Markdown
Contributor

@lijunwangs lijunwangs commented Dec 21, 2021

Problem

When the validator restarts some of the transaction earlier notified might be re-notified if it is restoring from an older snapshots.

Summary of Changes

Handle the conflict on (slot, signature), on conflict, overwrites.

Fixes #22003

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 22, 2021

Codecov Report

Merging #22057 (0d78274) into master (711856c) will increase coverage by 0.0%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #22057   +/-   ##
=======================================
  Coverage    81.3%    81.3%           
=======================================
  Files         517      517           
  Lines      145582   145582           
=======================================
+ Hits       118418   118459   +41     
+ Misses      27164    27123   -41     

@lijunwangs lijunwangs merged commit d6de4a2 into solana-labs:master Dec 22, 2021
mergify Bot pushed a commit that referenced this pull request Dec 22, 2021
* Handle PK violation issue for transaction notification. The transaction might be replayed due to
validator restart.

(cherry picked from commit d6de4a2)
mergify Bot added a commit that referenced this pull request Dec 23, 2021
* Handle PK violation issue for transaction notification. The transaction might be replayed due to
validator restart.

(cherry picked from commit d6de4a2)

Co-authored-by: Lijun Wang <83639177+lijunwangs@users.noreply.github.com>
@brooksprumo brooksprumo mentioned this pull request Jan 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to stream transaction due to duplicate primary key failure

2 participants