HonestManXin opened a new pull request, #63028:
URL: https://github.com/apache/doris/pull/63028

   ```
   "mysql-nio-pool-52" #340 daemon prio=5 os_prio=0 tid=0x00007f3ac801d800 
nid=0x3e35cd waiting for monitor entry [0x00007f39742d7000]
      java.lang.Thread.State: BLOCKED (on object monitor)
        at 
sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:215)
        - waiting to lock <0x00007f3f9c218f58> (a 
sun.security.provider.SecureRandom)
        at 
sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:534)
        at 
sun.security.provider.NativePRNG$RandomIO.access$400(NativePRNG.java:331)
        at sun.security.provider.NativePRNG.engineNextBytes(NativePRNG.java:220)
        at java.security.SecureRandom.nextBytes(SecureRandom.java:468)
        at java.util.UUID.randomUUID(UUID.java:145)
        at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:555)
        at 
org.apache.doris.qe.MysqlConnectProcessor.handleExecute(MysqlConnectProcessor.java:246)
        at 
org.apache.doris.qe.MysqlConnectProcessor.handleExecute(MysqlConnectProcessor.java:294)
   ```
   In high‑concurrency point‑query scenarios, a large number of requests 
require generating a UUID for internal identification. When the request rate is 
high, frequent calls to `UUID.randomUUID()` can introduce contention and become 
a minor performance bottleneck.
   
   For query, the UUID is only required to provide a unique identifier for 
request correlation, and cryptographic strength is not necessary. To reduce 
contention and improve throughput, this change introduces `fastUniqueId`, which 
generates RFC‑4122 compatible UUID v4 values using `ThreadLocalRandom`.
   
   By using a per‑thread random generator instead of the shared random source 
used by `UUID.randomUUID()`, UUID generation scales better under high 
concurrency while still preserving the standard UUID format.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to