Locking for secondary indexes

When a secondary index is inserted, deleted or replaced, it is locked with a root segment lock.

When the secondary index is used to access the target of the secondary index, depending on what the index points to, it might be necessary to lock the secondary index.