Description
Steps to reproduce are kind of similar to #7783 but they show a completely different problem.
- Set parameters in firebird.conf:
MaxParallelWorkers = 8
ParallelWorkers = 8
- Execute the script in isql:
index_drop_hang_fb_5_0.txt
Execution hangs for a minute at the last line drop index t1_idx1
. This happens because worker attachments have been creating t1_idx2
index recently, and after loading T1
table metadata they still have P1
procedure in the metadata cache. The statement of the procedure holds SR lock on t1_idx1
index. A minute later the timer thread releases worker attachments, and drop index t1_idx1
is finally completed.
A simple solution is to call MET_clear_cache
before putting a worker attachment into m_idleAtts
array. I've tried it and it works. On the one hand, clearing the cache can be useful because in a general case the worker attachment can perform totally different tasks. On the other hand, different tasks may use the same objects. Any opinions?