bigreybear opened a new pull request, #11828:
URL: https://github.com/apache/iotdb/pull/11828

   ## Description
   Previously, there was a deadlock issue caused by a reentrant write lock that 
would only unlock once, leading to a situation where any read thread attempting 
to access the page would be blocked.
   
   This reentrant lock scenario, although rare, occurred recurrently on the 
test server. If one page has just allocated (more precisely, pre-allocated) 
last few bytes, it will be removed from local(context) index buckets but not 
added back. Right now a segment of this page was transplanted into another 
page, the previous implementation failed to update spare space variation of 
this page in the local index buckets, which are designed for quick retrieval 
based on specified spare space. However, this page might have been previously 
marked in the global index bucket, with a spare space before allocation. And 
then it could be retrieved by the previous bucket entry, creating a reentrant 
lock situation.
   
   This revised version marks spare space variation of segment transplatation 
in local index buckets, eliminating the deadlock issue.
   
   
   <hr>
   
   ##### Key changed/added classes (or packages if there are too many classes) 
in this PR
   


-- 
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]

Reply via email to