See #2035. Adding an index will be a multi-step process:
- Adding the index to the TableDescriptor but marking it as write-only.
- Waiting for the TableDescriptor change to propagate to all of the nodes.
- Backfilling the index with some sort of mapreduce over the table.
- Marking the index as read-write in the TableDescriptor.
Note that the backfilling of a unique index might detect a duplicate key violation requiring the whole process to be rolled back.
Dropping an index will involve:
- Marking the index as deleting in the
TableDescriptor.
- Waiting for the
TableDescriptor change to propagate to all of the nodes.
- Deleting the index keys using a
DelRange operation.
- Removing the index from the
TableDescriptor.
See #2035. Adding an index will be a multi-step process:
Note that the backfilling of a unique index might detect a duplicate key violation requiring the whole process to be rolled back.
Dropping an index will involve:
TableDescriptor.TableDescriptorchange to propagate to all of the nodes.DelRangeoperation.TableDescriptor.