Skip to content

Conversation

@mason-sharp
Copy link
Member

Log in spock.resolutions when we receive a DELETE that is older than
the existing row (the DELETE was processed late).

Prior to this, the DELETE would be processed and the existing row deleted.
Now we can ignore since the timestamp is older.

While we are harmonizing conflict types with Postgres, no such type
exists for a late DELETE, so a new one was created, SPOCK_CT_DELETE_LATE.
To accommodate, moved to Spock having its own conflict types, while trying
to match those in Postgres for the large overlap.

Also added spock.output_delay GUC to make internal testing easier for
this case and future testing. It optionally adds a delay to the output plugin in
the begin callback and is used by a new test that was added. That is, one
can execute SQL on one node, then execute other SQL on another while
knowing that the earlier operations will arrive afterwards and create conflicts.

Copy link
Contributor

@ibrarahmad ibrarahmad left a comment

Choose a reason for hiding this comment

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

The patch itself looks good, but we need to update the docs.

@mason-sharp
Copy link
Member Author

The patch itself looks good, but we need to update the docs.

Thanks. We actually need such a section in the docs. I will do in a docs PR after doing one more conflict type handling PR soon.

@ibrarahmad ibrarahmad self-requested a review January 23, 2026 12:33
@ibrarahmad ibrarahmad merged commit faee4f1 into main Jan 23, 2026
5 checks passed
@ibrarahmad ibrarahmad deleted the task/SPOC-317/delete-timestamp branch January 23, 2026 12:33
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.

3 participants