If setSN and getSN are called concurrently so that getSN sees
the new log with a higher sequence number, it will check if there is any
new file by calling skiplist_next. However, it doesn't release the
skiplist node so that its reference count doesn't decrease. It becomes
a problem when we remove that log file; since its reference count can't
be zero, the thread is hanging there forever.
If
setSN
andgetSN
are called concurrently so thatgetSN
sees the new log with a higher sequence number, it will check if there is any new file by callingskiplist_next
. However, it doesn't release the skiplist node so that its reference count doesn't decrease. It becomes a problem when we remove that log file; since its reference count can't be zero, the thread is hanging there forever.Added a new callback function for debugging.