uint128_t FullMasterCM::commit( const uint32_t incarnation ) { Mutex mutex( _slaves ); #if 0 EQLOG( LOG_OBJECTS ) << "commit v" << _version << " " << command << std::endl; #endif EQASSERT( _version != VERSION_NONE ); _updateCommitCount( incarnation ); if( _object->isDirty( )) { InstanceData* instanceData = _newInstanceData(); instanceData->os.enableCommit( _version + 1, *_slaves ); _object->getInstanceData( instanceData->os ); instanceData->os.disable(); if( instanceData->os.hasSentData( )) { ++_version; EQASSERT( _version != VERSION_NONE ); #if 0 EQINFO << "Committed v" << _version << "@" << _commitCount << ", id " << _object->getID() << std::endl; #endif _addInstanceData( instanceData ); } else _instanceDataCache.push_back( instanceData ); } _obsolete(); return _version; }
void FullMasterCM::_commit() { InstanceData* instanceData = _newInstanceData(); instanceData->os.enableCommit( _version + 1, *_slaves ); _object->getInstanceData( instanceData->os ); instanceData->os.disable(); if( instanceData->os.hasSentData( )) { ++_version; LBASSERT( _version != VERSION_NONE ); #if 0 LBINFO << "Committed v" << _version << "@" << _commitCount << ", id " << _object->getID() << std::endl; #endif _addInstanceData( instanceData ); } else _instanceDataCache.push_back( instanceData ); }