Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ private boolean isInterruptedException(Throwable e) {
public void run() {
runnerLog.trace("A TransactionRunner is starting for {} {} ", fate.getStore().type(),
fateOps);
threadId = Thread.currentThread().getId();
threadId = Thread.currentThread().threadId();
try {
while (fate.getKeepRunning().get() && !isShutdown() && !stop.get()) {
FateTxStore<T> txStore = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ public interface ScanScope extends AutoCloseable {
public static ScanScope enable(Span span) {
if (span.isRecording()) {
INSTRUMENTED_SCANS.set(new ScanInstrumentationImpl());
var id = Thread.currentThread().getId();
var id = Thread.currentThread().threadId();
return () -> {
Preconditions.checkState(id == Thread.currentThread().getId());
Preconditions.checkState(id == Thread.currentThread().threadId());
INSTRUMENTED_SCANS.remove();
};
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static Thread createCriticalThread(String name, OptionalInt priority, Run
// required Java version is at least 19
public static String toString(Thread t) {
StringBuilder sb = new StringBuilder("Thread[#");
sb.append(t.getId()).append(",").append(t.getName()).append(",").append(t.getPriority())
sb.append(t.threadId()).append(",").append(t.getName()).append(",").append(t.getPriority())
.append(",");
ThreadGroup group = t.getThreadGroup();
if (group != null) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ under the License.
<failsafe.forkCount>1</failsafe.forkCount>
<failsafe.groups />
<failsafe.reuseForks>false</failsafe.reuseForks>
<javaVersion>17</javaVersion>
<javaVersion>21</javaVersion>
<!-- prevent introduction of new compiler warnings -->
<maven.compiler.failOnWarning>true</maven.compiler.failOnWarning>
<maven.javadoc.failOnWarnings>true</maven.javadoc.failOnWarnings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public AsyncConditionalTabletsMutatorImpl(Consumer<Ample.ConditionalResult> resu
this.resultsConsumer = Objects.requireNonNull(resultsConsumer);
this.mutatorFactory = mutatorFactory;
this.bufferingMutator = mutatorFactory.get();
var creatorId = Thread.currentThread().getId();
var creatorId = Thread.currentThread().threadId();
this.executor = Executors.newSingleThreadExecutor(runnable -> Threads.createCriticalThread(
"Async conditional tablets mutator background thread, created by : #" + creatorId,
runnable));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static class ScanThreadStackTrace {
public final StackTraceElement[] stackTrace;

private ScanThreadStackTrace(Thread thread) {
this.threadId = thread.getId();
this.threadId = thread.threadId();
this.stackTrace = thread.getStackTrace();
this.threadName = thread.getName();
}
Expand Down