reschke commented on code in PR #2792:
URL: https://github.com/apache/jackrabbit-oak/pull/2792#discussion_r2909987461
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LeaseCheckDocumentStoreWrapper.java:
##########
@@ -253,6 +256,24 @@ public int getNodeNameLimit() {
*/
@Override
public Throttler throttler() {
- return delegate.throttler();
+ return leaseChecking(() ->
+ delegate.throttler());
+ }
+
+ private <T> T leaseChecking(Supplier<T> operation) {
+ performLeaseCheck();
+ try {
+ return operation.get();
+ } finally {
+ performLeaseCheck();
+ }
+ }
+ private void leaseChecking(Runnable operation) {
+ performLeaseCheck();
+ try {
+ operation.run();
+ } finally {
+ performLeaseCheck();
Review Comment:
Yes, I think. Note that this case apparently has no test coverage (or it is
the reason for the tests complaining about the incorrect exception message).
Let me try that.
--
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]