-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FileExists and DeleteFile to Env #174
Conversation
LGTM |
SaveError(errptr, env->rep->FileExists(path)); | ||
} | ||
|
||
void crocksdb_env_delete_file(crocksdb_env_t* env, const char* path, char** errptr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete it via Env
? Why not just use fs::remove_file
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because file
can be any kind of types, for example memory sst file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide a link to the explanation of memory SST file? Does it have a path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In RocksDB, Env
is an interface to abstract some platform-dependent APIs.
For example, I can provide a MemEnv
, which maintains a virtual file system in memory.
Then I can create a SstFileWriter
with the MemEnv
to generate SST file in memory.
Ref: https://github.com/facebook/rocksdb/blob/master/env/mock_env.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
update titan to include tikv/titan#169 for tikv-4.x include the following changes ``` 81814ec 2020-06-04 zbk602423539@gmail.. Fix GC may delete a already deleted blob file (#168) (#169) 80657c0 2020-06-04 zbk602423539@gmail.. Fix wrong assert delta < 0 for cocurrent compaction while flush (#172) (#176) 0db7976 2020-06-04 sre-bot@pingcap.com Fix wrong live data size when encounter rewrite failure (#161) (#175) c41f2a2 2020-06-04 sre-bot@pingcap.com feat: Titan should return user value to compaction filter #163 (#164) (#174) ``` Signed-off-by: sre-bot <sre-bot@pingcap.com>
No description provided.