mirror of
https://github.com/apple/foundationdb.git
synced 2025-06-01 02:37:02 +08:00
Compile on macOS 10.13.4: Use ASSERT_ABORT in destructors. Import fstream
This commit is contained in:
parent
56f705682f
commit
a9f54e1865
@ -135,7 +135,7 @@ public:
|
||||
~DLThreadSingleAssignmentVar() {
|
||||
lock.assertNotEntered();
|
||||
if(f) {
|
||||
ASSERT(futureRefCount == 1);
|
||||
ASSERT_ABORT(futureRefCount == 1);
|
||||
api->futureDestroy(f);
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ LocationInfo::~LocationInfo() {
|
||||
for( auto const& alternative : getAlternatives() )
|
||||
handles.push_back( alternative.v.getVersion.getEndpoint().token ); // must match above choice of UID
|
||||
std::sort( handles.begin(), handles.end() );
|
||||
ASSERT( handles.size() );
|
||||
ASSERT_ABORT( handles.size() );
|
||||
|
||||
auto it = cx->ssid_locationInfo.find( handles );
|
||||
if( it != cx->ssid_locationInfo.end() )
|
||||
@ -540,7 +540,7 @@ DatabaseContext::~DatabaseContext() {
|
||||
monitorMasterProxiesInfoChange.cancel();
|
||||
for(auto it = ssid_locationInfo.begin(); it != ssid_locationInfo.end(); it = ssid_locationInfo.erase(it))
|
||||
it->second->notifyContextDestroyed();
|
||||
ASSERT( ssid_locationInfo.empty() );
|
||||
ASSERT_ABORT( ssid_locationInfo.empty() );
|
||||
locationCache.insert( allKeys, Reference<LocationInfo>() );
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ Future<Void> AsyncFileCached::quiesce() {
|
||||
AsyncFileCached::~AsyncFileCached() {
|
||||
while ( !pages.empty() ) {
|
||||
auto ok = pages.begin()->second->evict();
|
||||
ASSERT( ok );
|
||||
ASSERT_ABORT( ok );
|
||||
}
|
||||
openFiles.erase( filename );
|
||||
}
|
||||
|
@ -450,7 +450,7 @@ struct AFCPage : public EvictablePage, public FastAllocated<AFCPage> {
|
||||
|
||||
virtual ~AFCPage() {
|
||||
clearDirty();
|
||||
ASSERT( flushableIndex == -1 );
|
||||
ASSERT_ABORT( flushableIndex == -1 );
|
||||
}
|
||||
|
||||
void setDirty() {
|
||||
|
@ -425,7 +425,7 @@ struct LogData : NonCopyable, public ReferenceCounted<LogData> {
|
||||
tLogData->bytesDurable += bytesInput.getValue() - bytesDurable.getValue();
|
||||
TraceEvent("TLogBytesWhenRemoved", tli.id()).detail("sharedBytesInput", tLogData->bytesInput).detail("sharedBytesDurable", tLogData->bytesDurable).detail("localBytesInput", bytesInput.getValue()).detail("localBytesDurable", bytesDurable.getValue());
|
||||
|
||||
ASSERT(tLogData->bytesDurable <= tLogData->bytesInput);
|
||||
ASSERT_ABORT(tLogData->bytesDurable <= tLogData->bytesInput);
|
||||
endRole(tli.id(), "TLog", "Error", true);
|
||||
|
||||
if(!tLogData->terminated) {
|
||||
|
@ -460,7 +460,7 @@ static int asyncDeviceCharacteristics(sqlite3_file *pFile){ return 0; }
|
||||
//resulting in a locking error
|
||||
auto itr = SharedMemoryInfo::table.find(filename);
|
||||
if(itr != SharedMemoryInfo::table.end()) {
|
||||
ASSERT(itr->second.refcount == 0);
|
||||
ASSERT_ABORT(itr->second.refcount == 0);
|
||||
itr->second.cleanup();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user