Ian Boston wrote:
...
Unfortunately building a hashed tree of folders results in non-mergable changes.
before
/store/ab

thread1
/store/ab/ed/8c/data.json

thread2
/store/ab/ed/8c/otherdata.json

the creation of ed is a non mergable change, and I don't fancy creating the 255^3 nodes to avoid the problem.
...

How about creating the intermediate folders on demand, but in separate JCR save operations? In that case at least the exception handling gets much simpler, because the only reason the single createNode/nt:folder would fail would be a race condition - so after the exception you'd just check whether the folder was created by a different thread, in which case you wouldn't need to retry...

BR, Julian

Reply via email to