...even if tech.ydb.yoj.repository.db logger level is higher than DEBUG, and typically none of the transaction statements ever need to be logged.
You can wreak havoc with a simple entity like this:
@Value
@EqualsAndHashCode(doNotUseGetters = true)
public class BadToStringEntity implements Entity<BadToStringEntity> {
@NonNull
Id id;
@Nullable
Duration toStringDuration;
@SuppressWarnings("unused")
public Duration getToStringDuration() {
// Mwahahahahahah #1: NPE if a nullable field is null
Objects.requireNonNull(toStringDuration, "toStringDuration");
// Mwahahahahahah #2: Delay if a nullable field is not null
Uninterruptibles.sleepUninterruptibly(toStringDuration);
return toStringDuration;
}
public record Id(@NonNull String id) implements Entity.Id<BadToStringEntity> {
}
}