Skip to content

Conversation

@keith-turner
Copy link
Contributor

Implements setting time for unhosted tablets for bulk imports. Setting time for a bulk import will fail if the tablet is hosted. Before this commit it always failed.

see #3354

Implements setting time for unhosted tablets for bulk imports.  Setting
time for a bulk import will fail if the tablet is hosted.  Before this
commit it always failed.

see apache#3354
@keith-turner
Copy link
Contributor Author

keith-turner commented Oct 3, 2023

With this change and the changes in #3796, ShellServerIT may run which means that mvn verify -Psunny may run for the elasiticity branch

@dlmarion
Copy link
Contributor

dlmarion commented Oct 4, 2023

This PR made me wonder what would happen with concurrent Tablet hosting and TabletMetadata modification.

@dlmarion
Copy link
Contributor

dlmarion commented Oct 4, 2023

Does this fix #3354 ?

@keith-turner
Copy link
Contributor Author

This PR made me wonder what would happen with concurrent Tablet hosting and TabletMetadata modification.

This change checks the tablet does not have a location set, then when makes the update it requires on the conditional mutation that location is that same as what it saw (not set). So if the tablet gets hosted after it read tablet metadata, then the conditional mutation should fail because the location is set.

Does this fix #3354 ?

Not quite. Still need to handle the case of setting the time when the tablet is hosted. I have a way to do that in mind, but it add a lot of code. Trying to think of something simpler. When the tablet is hosted can not increment the time in the metadata table. Need to reach out to the hosted tablet and get it to allocate a timestamp and record that in its WAL. Recording only a timestampt in the tablets WAL would require a new WAL record type (because its not a mutation, usually record Mutation+timestamp in the WAL). So still trying to think of a way to avoid increasing the WAL complexity for the hosted case.

@keith-turner keith-turner merged commit 19760b6 into apache:elasticity Oct 4, 2023
@ctubbsii ctubbsii added this to the 4.0.0 milestone Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants