stefan-egli commented on PR #1779: URL: https://github.com/apache/jackrabbit-oak/pull/1779#issuecomment-2432904182
draft now contains both required parts of a fix: * first part is simple : check for uncommitted state. if the local map contains only uncommitted revisions, then we don't need to scan previous documents. this state however happens only for a very small amount of time (between writing the changes and setting the revision committed) * second part now done based on cache approach : introduce a tiny (1%) cache that remembers whether a previous document (and its children) had no revision whatsoever of a particular property. This can then be used to avoid subsequent scans. But the first scan is necessary in this approach. We could further restrict the cache to only be used on root and say first level children - to further reduce impact and to ensure it remains tiny indeed. FTR: another approach would be to store an explicit null revision whenever adding a new property to a document (or restrict that to root and eg first level children). The null revision would have to be chosen in a way to ensure it is always visible. I.e. it probably would have to be something like "r1-0-i". The impact of this second approach is slightly wider, as it does change what's written to the DocumentStore - hence the first suggestion to discuss the cache approach. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
