Skip to content

Commit

Permalink
unfix bug. there was no bug. i don't know.
Browse files Browse the repository at this point in the history
  • Loading branch information
polferov committed Sep 14, 2024
1 parent 7ab29f4 commit 3d06819
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,11 @@ public PersistenceSpanProcessor(final QuarkusCqlSession session) {

@Override
public void accept(final PersistenceSpan span) {

// condition was removed, since it was for some unknown reason causing issues.
// However, with cassandras primary key the whole table basically functions as a set, so no worries.
// final Set<String> knownHashes = knownHashesByLandscape.computeIfAbsent(span.landscapeToken(),
// uuid -> ConcurrentHashMap.newKeySet());
// if (knownHashes.add(span.methodHash())) {
final Set<String> knownHashes = knownHashesByLandscape.computeIfAbsent(span.landscapeToken(),
uuid -> ConcurrentHashMap.newKeySet());
if (knownHashes.add(span.methodHash())) {
insertSpanStructure(span);
// }
}

// TODO: We should probably only insert spans
// after corresponding span_structure has been inserted?
Expand Down Expand Up @@ -158,7 +155,7 @@ private void insertSpanDynamic(final PersistenceSpan span) {
.log("Saved new dynamic span with method_hash={}, method_fqn={}, trace_id={}");
} else {
lastFailures.incrementAndGet();
//LOGGER.error("Could not persist trace by time", failure);
LOGGER.error("Could not persist trace by time", failure);
}
});
/*session.executeAsync(stmtByHash).exceptionally(failure -> {
Expand All @@ -183,7 +180,7 @@ private void insertTrace(final PersistenceSpan span) {
.log("Saved new trace with token={}, trace_id={}, and ten second epoch bucket={}");
} else {
lastFailures.incrementAndGet();
//LOGGER.error("Could not persist trace by time", failure);
LOGGER.error("Could not persist trace by time", failure);
}
});
}
Expand Down

0 comments on commit 3d06819

Please sign in to comment.