Skip to content

Conversation

lavrukov
Copy link
Contributor

No description provided.

@lavrukov lavrukov force-pushed the tx-manager-tracer-2 branch 4 times, most recently from f330c02 to 5b47768 Compare October 17, 2025 18:23
@lavrukov lavrukov force-pushed the tx-manager-tracer-2 branch from 5b47768 to a40fcb2 Compare October 17, 2025 18:28
}
}
} catch (Exception e) {
tracer.onException();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tracer.onException(e) will be more extensible

}
}
results.labels(name, "fail").inc();
tracer.onRetryExceeded();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as onException(e), onRetryExceeded(e) will offer more extensibility

import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Supplier;

import static java.lang.String.format;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import is unused, please remove it (Checkstyle)

public ReadonlyBuilder withStatementIsolationLevel(IsolationLevel isolationLevel) {
Preconditions.checkArgument(isolationLevel.isReadOnly(),
"readOnly() can only be used with a read-only tx isolation level, but got: %s", isolationLevel);
"readOnly() can only be used with a read-only tx isolation level, but got: %s", isolationLevel
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor whitespace change. I'd leave it as-is instead

import java.util.function.Consumer;
import java.util.function.Supplier;

public interface StdTxManagerTracer {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make the interface part of StdTxManagerTracer an interface inside StdTxManager, like TracerFactory.

And the Tracer implementations will be in separate class(es), as they are now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants