Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
None
-
None
-
None
Description
In debugging a test, I found myself in CreateTableCommand. The evc option will automatically set the VisibilityConstraint on the newly created table by doing the following:
createtable() addConstraint()
This approach has a subtle race condition. The tabletserver hosting the tablet for the newly created table might not see the table option update that occurs as a part of addConstraint. This means the above two commands may both successfully return but the client has the ability to data that doesn't satisfy the constraint until the tserver's table configuration observer sees the update.
Thankfully, the CreateTable fate op has the ability to pass in a set of properties for a table. The TableOperationsImpl class generates the default set of table properties, but we should also allow users to provide their own options that can override these defaults.
billie.rinaldi also had the idea to create some helper methods that would simplify the API for making configuring IteratorSettings and Constraints to the generic Map<String,String> object we'd want TableOperations to accept.