-
Ole John Aske authored
NDB_SHARE PREMATURELY DESTRUCTED BY BINLOG RESTART,DUE TO INCORRECT REF COUNTING That patch enhanced ndbcluster_mark_share_dropped() such that it destructed the share itself, instead of calling ndbcluster_real_free_share() when the use_count reached '0'. However we failed to call ndb_index_stat_free() before ndbcluster_mark_share_dropped() called NDB_SHARE::destroy(). Instead of introducing that call into ndbcluster_mark_share_dropped(), this patch does some restructuring to achive the same - with less duplicated code: - ndbcluster_mark_share_dropped() is enhanced to free the index_stat when the share is dropped. - ndbcluster_real_free_share() is enhanced to require the share to be in the dropped state before it is called. - An assert is added to NDB_SHARE::destroy() checking that the index_stat has been freed prior to call.
Ole John Aske authoredNDB_SHARE PREMATURELY DESTRUCTED BY BINLOG RESTART,DUE TO INCORRECT REF COUNTING That patch enhanced ndbcluster_mark_share_dropped() such that it destructed the share itself, instead of calling ndbcluster_real_free_share() when the use_count reached '0'. However we failed to call ndb_index_stat_free() before ndbcluster_mark_share_dropped() called NDB_SHARE::destroy(). Instead of introducing that call into ndbcluster_mark_share_dropped(), this patch does some restructuring to achive the same - with less duplicated code: - ndbcluster_mark_share_dropped() is enhanced to free the index_stat when the share is dropped. - ndbcluster_real_free_share() is enhanced to require the share to be in the dropped state before it is called. - An assert is added to NDB_SHARE::destroy() checking that the index_stat has been freed prior to call.
Loading