Skip to content

Conversation

@morningman
Copy link
Contributor

When calling SnapshotLoader.move(), all files should be revoked if they
are in GC queue, or the file may be deleted after move() success.

ISSUE #1191

When calling SnapshotLoader.move(), all files should be revoked if they
are in GC queue, or the file may be deleted after move() success.
for (auto& snapshot_file : snapshot_files) {
if (std::find(tablet_files.begin(), tablet_files.end(), snapshot_file) != tablet_files.end()) {
std::string file_path = tablet_path + "/" + snapshot_file;
files_to_check.push_back(file_path);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
files_to_check.push_back(file_path);
files_to_check.emplace_back(std::move(file_path));

std::string full_dest_path = tablet_path + "/" + file;
RETURN_IF_ERROR(FileUtils::copy_file(full_src_path, full_dest_path));
VLOG(2) << "copy file from " << full_src_path<< " to " << full_dest_path;
if (link(full_src_path.c_str(), full_dest_path.c_str()) != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this function return failed, who will clean the already linked files

get the error msg for link error

@morningman morningman force-pushed the restore_delete_file_bug branch from fb4780b to fe37e6a Compare May 23, 2019 09:20
@morningman morningman merged commit 488e382 into apache:master May 23, 2019
luwei16 pushed a commit to luwei16/Doris that referenced this pull request Apr 7, 2023
…add gc (apache#1191) (apache#1193)

* [improvement](memory) simplify memory config related to tcmalloc

There are several configs related to tcmalloc, users do know how to config them. Actually users just want two modes, performance or compact, in performance mode, users want doris run query and load quickly while in compact mode, users want doris run with less memory usage.

If we want to config tcmalloc individually, we can use env variables which are supported by tcmalloc.

* [improvement](tcmalloc) add moderate mode and avoid oom  with a lot of cache (apache#14374)

ReleaseToSystem aggressively when there are little free memory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants