Skip to content

Commit

Permalink
Skip check blocks when verify base commit
Browse files Browse the repository at this point in the history
  • Loading branch information
杨赫然 committed Jan 13, 2025
1 parent 9100779 commit 2b0e67e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/gc/verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ typedef struct VerifyData {
gint64 truncate_time;
gboolean traversed_head;
GHashTable *exist_blocks;
gboolean traverse_base_commit;
} VerifyData;

static int
Expand Down Expand Up @@ -47,6 +48,10 @@ fs_callback (SeafFSManager *mgr,
{
VerifyData *data = user_data;

if (data->traverse_base_commit) {
return TRUE;
}

if (type == SEAF_METADATA_TYPE_FILE && check_blocks (data, obj_id) < 0)
return FALSE;

Expand Down Expand Up @@ -100,6 +105,8 @@ verify_virtual_repos (VerifyData *data)
return 0;
}

data->traverse_base_commit = TRUE;

GList *vrepo_ids = NULL, *ptr;
char *repo_id;
SeafVirtRepo *vinfo;
Expand Down

0 comments on commit 2b0e67e

Please sign in to comment.