File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
exist-core/src/main/java/org/exist/storage/lock Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -576,7 +576,12 @@ public ManagedDocumentLock acquireDocumentWriteLock(final XmldbURI documentPath)
576
576
* @return true if a WRITE_LOCK is held
577
577
*/
578
578
public boolean isDocumentLockedForWrite (final XmldbURI documentPath ) {
579
- final MultiLock existingLock = getDocumentLock (documentPath .toString ());
579
+ final MultiLock existingLock ;
580
+ if (!usePathLocksForDocuments ) {
581
+ existingLock = getDocumentLock (documentPath .toString ());
582
+ } else {
583
+ existingLock = getPathLock (documentPath .toString ());
584
+ }
580
585
return existingLock .getWriteLockCount () > 0 ;
581
586
}
582
587
@@ -588,7 +593,12 @@ public boolean isDocumentLockedForWrite(final XmldbURI documentPath) {
588
593
* @return true if a READ_LOCK is held
589
594
*/
590
595
public boolean isDocumentLockedForRead (final XmldbURI documentPath ) {
591
- final MultiLock existingLock = getDocumentLock (documentPath .toString ());
596
+ final MultiLock existingLock ;
597
+ if (!usePathLocksForDocuments ) {
598
+ existingLock = getDocumentLock (documentPath .toString ());
599
+ } else {
600
+ existingLock = getPathLock (documentPath .toString ());
601
+ }
592
602
return existingLock .getReadLockCount () > 0 ;
593
603
}
594
604
You can’t perform that action at this time.
0 commit comments