You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: NewAppendableFile does not record newly created FileState in file_map_ #1328
When a new appendable file is created (i.e., the file does not exist in file_map_), a new FileState object is instantiated and referenced. However, the new FileState is never assigned back to the file_map_, breaking the association between the filename and the FileState object.
Current Code
Status NewAppendableFile(const std::string& fname,
WritableFile** result) override {
MutexLock lock(&mutex_);
FileState** sptr = &file_map_[fname];
FileState* file = *sptr;
if (file == nullptr) {
file = newFileState();
file->Ref();
// BUG: Missing assignment back to file_map_
}
*result = newWritableFileImpl(file);
returnStatus::OK();
}
Activity