فهرست منبع
Bug(s) fixed: 155087
Bug Description: performance counters gone after replication initialization
Reviewed by: Nathan, Noriko, and David (Thanks!)
Fix Description: There is a state flag in the backend object. When repl init starts, the bulk import start code eventually calls dblayer_instance_close which does some closure of the backend, including setting the state flag to STOPPED. However, when repl init completes, the bulk import code eventually calls dblayer_instance_start which does not set the state flag. The only place where the state flag is set is in ldbm_instance_start (which also calls dblayer_instance_start). From my brief investigation, it doesn't appear that ldbm_instance_stop and start are all that useful - they only deal with changing the state flag to stopped or started, and that is used in very few places, the monitor code being one of them. This fix makes it "symmetrical" e.g. you undo in dblayer_instance_start what was done in dblayer_instance_close.
A better solution might be to call ldbm_instance_stop instead of dblayer_instance_close from bulk_import_start and remove the code to set the state to stopped from dblayer_instance_close. Then do the same in import_all_done - call ldbm_instance_start instead of dblayer_instance_start. The only difference is the locking for be_state_lock - perhaps some programmer decided to use the dblayer function instead of the ldbm function to avoid deadlock? But I don't think doing that would introduce any more chances of deadlock. The other problem with this is that ldbm_instance_stop deletes the cache, while dblayer_instance_close merely cleans it out.
Platforms tested: RHEL3
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none