Serial number generation buge modification

Distributed Considerations

1. High concurrency, 2. Network latency---things are rolled back, 3. Expectations and results of each step of troubleshooting

 

Since sleep(1000) is added to the tool class for generating serial numbers, each time a serial number is generated, it sleeps for 1 second, which will inevitably lead to a timeout. The largest serial number in the timeout data is not updated, and then the actual memory has been generated.

///There is an exception and the catch is dropped, and then the exception information is not printed, and the program can continue to run

 

 

try{

} catch (Exception e) {

} finally {

   Long end = System.currentTimeMillis();

   Long useTime = end - start;

}

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326018450&siteId=291194637