[ 
https://issues.apache.org/jira/browse/OAK-10657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17819566#comment-17819566
 ] 

Stefan Egli commented on OAK-10657:
-----------------------------------

Re risk minimization : Good point. Perhaps it also means it doesn't have to 
cleanup all the cases as this is only the first iteration. I guess eventually, 
the on-exception-cleanup could be completely thorough - but it's fine if we 
implement it step by step.

1) Maybe we can compare it with the existing cleanup mechanisms: (a) split for 
example runs everywhere but only treats its own clusterId (also due to the way 
_prev data structure is designed) whereas (b) classic GC runs only on the 
leader (to avoid concurrent updates) but treats all clusterIds. So comparing to 
that this cleanup might not fit neither and is somewhere in between. But I 
think it would be best if it would cleanup for all clusterIds - knowing that it 
could be competing with other cluster instances trying to do the same.

2) yes, I think it must be _modCount based (both as a condition and that it 
does a +1). I think that's a general contract that is far reaching (conflict 
detection, immutable thus easily cacheable objects).

> MongoDocumentStore: shrink in-DB documents after updates fail due to 16MB 
> limit
> -------------------------------------------------------------------------------
>
>                 Key: OAK-10657
>                 URL: https://issues.apache.org/jira/browse/OAK-10657
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: documentmk, mongomk
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Major
>
> To address the 16MB/childorder issue, there are many potential approaches:
> - make GC more aggressive 
> - try to change updates to remove "in-between" changes of ":childOrder" 
> property
> - change the data model of ":childOrder"
> - try to shrink document in DB once size related exception happens
> This ticket is about the last of these options.
> Proposal:
> - improve exception thrown by document store so that it can be acted upon
> - in document store utils add a method that inspects a document and produces 
> UpdateOps suitable to shrink the document
> - DocumentNodeStore commit could catch exception, obtain update ops, apply 
> them, and retry once (this should be dependant on a feature toggle)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to