erlexec icon indicating copy to clipboard operation
erlexec copied to clipboard

add option to disable list-like behavior (offset2id) and use it in executors

Open alaeddine-13 opened this issue 3 years ago • 0 comments
trafficstars

DocArray allows list-like behavior by adding offset2id structure to storage backends. This means the database stores, along with documents, meta information about document order. This information is only updated/synced when a DA is destroyed or quit the context manager. Furthermore, offset2id is updated in memory in all update operations. However, offset2id is not useful in indexers where concurrent usage is possible and users do not need information about document location. Besides, updating offset2id is not efficient. Therefore, it's important to have an option that disables list-like behavior (and offset2id with it) and use it in DocumentArray indexers. Alternatively, we can have a parent class DocumentStore that encapsulates all DocumentArray functionalities except list-like behavior.

alaeddine-13 avatar Sep 16 '22 11:09 alaeddine-13