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

Julian Reschke commented on OAK-10657:
--------------------------------------

Looking at 
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreException.java
 ...

We apparently decided not to use a hierarchy of exceptions, but just to use 
message + type. Type can be GENERIC or TRANSIENT to allow retries. That doesn't 
help here, as the operation only becomes retryable after cleaning up the 
document.

Choices:

- add a new type (FWIW, an API change)
- inspect mesage or cause (in the latter case we'd need to invent something for 
testing with MemoryDocumentStore)
- leave the handling to the actual store implementation

Feedback appreciated...

> 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