File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
runtime/service/src/main/java/org/apache/polaris/service Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 2222
2323public final class FilterPriorities {
2424 public static final int REQUEST_ID_FILTER = Priorities .AUTHENTICATION - 101 ;
25- public static final int REALM_CONTEXT_FILTER = Priorities . AUTHENTICATION - 100 ;
25+ public static final int REALM_CONTEXT_FILTER = REQUEST_ID_FILTER + 1 ;
2626 public static final int RATE_LIMITER_FILTER = Priorities .USER ;
2727 public static final int MDC_FILTER = REALM_CONTEXT_FILTER + 1 ;
2828 public static final int TRACING_FILTER = REALM_CONTEXT_FILTER + 2 ;
Original file line number Diff line number Diff line change @@ -36,14 +36,12 @@ public class RequestIdGenerator {
3636 public String generateRequestId () {
3737 long currentCounter = COUNTER .incrementAndGet ();
3838 String requestId = baseDefaultUuid + "_" + currentCounter ;
39- if (currentCounter >= COUNTER_SOFT_MAX ) {
40- if (resetInProgress .compareAndSet (false , true )) {
41- // If we get anywhere close to danger of overflowing Long (which, theoretically,
42- // would be extremely unlikely) rotate the UUID and start again.
43- baseDefaultUuid = UUID .randomUUID ().toString ();
44- COUNTER .set (0 );
45- resetInProgress .set (false );
46- }
39+ if (currentCounter >= COUNTER_SOFT_MAX && resetInProgress .compareAndSet (false , true )) {
40+ // If we get anywhere close to danger of overflowing Long (which, theoretically,
41+ // would be extremely unlikely) rotate the UUID and start again.
42+ baseDefaultUuid = UUID .randomUUID ().toString ();
43+ COUNTER .set (0 );
44+ resetInProgress .set (false );
4745 }
4846 return requestId ;
4947 }
You can’t perform that action at this time.
0 commit comments