#2020·cocoindex

[FEATURE] Support optimistic target state write

Author: georgeh0Created May 25, 2026Updated Jul 20, 2026
Labelscocoindex-core

Currently, all target state commit happens as a dedicated "submit" phase after processing done, for each component.

Sometimes we need to both read and write the same state, and "read" happens during processing, e.g. when we do entity resolution / alignment. There can be a write skew if we have to do read and write separately. Hence we can introduce a "optimistic target state write" mechanism, i.e. target state write can happen during processing, and we start to track it as soon as it's written so that even if the processing fails and submit doesn't happen, we'll be able to clean up the target state, in the same or next run.


❤️ Contributors, please refer to Contributing Guide. Unless the PR can be sent immediately (e.g. just a few lines of code), we recommend you to leave a comment on the issue like I'm working on it or Can I work on this issue? to avoid duplicating work. Our Discord server is always open and friendly.