Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: plumb LDR originTimestamp from session var to TableWriter #131456

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

msbutler
Copy link
Collaborator

sql: bind OriginTimestamp to table writer based on session var

This patch follows the same strategy for plumbing the OriginID from a session
variable to every batch request header in the table writer, seen in #126394.

In a future commit, Logical Data Replication will use the origin timestamp
session variable to ensure all LDR writes are plumbed with their associated
OriginTimestamp.

Epic: none

Release note: none


sessiondata: add OriginTimestampForLogicalDataReplication session var

This patch adds a new session variable which only the internal executor may
set, that all LDR writes via the SQL layer will set. A future commit will plumb
the value of this OriginTimestamp session var and bind it to every batch
created by the TableWriter. This patch follows the same plumbing approach we
took to plumb the OriginID in #126394 .

Epic: none

Release note: none

Copy link

blathers-crl bot commented Sep 26, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

This patch adds a new session variable which only the internal executor may
set, that all LDR writes via the SQL layer will set. A future commit will plumb
the value of this OriginTimestamp session var and bind it to every batch
created by the TableWriter. This patch follows the same plumbing approach we
took to plumb the OriginID in cockroachdb#126394 .

Epic: none

Release note: none
This patch follows the same strategy for plumbing the OriginID from a session
variable to every batch request header in the table writer, seen in cockroachdb#126394.

In a future commit, Logical Data Replication will use the origin timestamp
session variable to ensure all LDR writes are plumbed with their associated
OriginTimestamp.

Epic: none

Release note: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants