partially implements setting time for bulk imports#3807
partially implements setting time for bulk imports#3807keith-turner merged 1 commit intoapache:elasticityfrom
Conversation
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
|
With this change and the changes in #3796, ShellServerIT may run which means that |
|
This PR made me wonder what would happen with concurrent Tablet hosting and TabletMetadata modification. |
|
Does this fix #3354 ? |
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.
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. |
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