编译告警清理
This commit is contained in:
@ -671,7 +671,6 @@ static void progress_report(int tablespacenum, const char* filename, bool force)
|
||||
pg_time_t now = 0;
|
||||
int elapsed_secs = 0;
|
||||
int caculate_secs = 0;
|
||||
static bool print = true;
|
||||
|
||||
/*
|
||||
* report and cacluate speed for every report_timeout or the sync percent changed.
|
||||
@ -1558,7 +1557,7 @@ static bool BaseBackup(const char* dirname, uint32 term)
|
||||
/* Print the progress of the tool execution through a new thread. */
|
||||
g_totalTableSpace = PQntuples(res);
|
||||
fprintf(stderr, "Begin Receiving files \n");
|
||||
pthread_t progressThread = NULL;
|
||||
pthread_t progressThread;
|
||||
pthread_create(&progressThread, NULL, ProgressReportFullBuild, NULL);
|
||||
|
||||
/*
|
||||
@ -2808,7 +2807,7 @@ static void *ProgressReportFullBuild(void *arg) {
|
||||
/* progress report */
|
||||
percent = (int)((totaldone / 1024) * 100 / totalsize);
|
||||
GenerateProgressBar(percent, progressBar);
|
||||
fprintf(stderr, "Progress: %s %d%% (%d/%dKB). (%d/%d)tablespaces. Receive files \r",
|
||||
fprintf(stderr, "Progress: %s %d%% (%lu/%luKB). (%d/%d)tablespaces. Receive files \r",
|
||||
progressBar, percent, (totaldone / 1024), totalsize, g_curTableSpace, g_totalTableSpace);
|
||||
pthread_mutex_lock(&g_mutex);
|
||||
timespec timeout;
|
||||
@ -2826,7 +2825,7 @@ static void *ProgressReportFullBuild(void *arg) {
|
||||
} while (((totaldone / 1024) < totalsize) && !g_progressFlag);
|
||||
percent = 100;
|
||||
GenerateProgressBar(percent, progressBar);
|
||||
fprintf(stderr, "Progress: %s %d%% (%d/%dKB). (%d/%d)tablespaces. Receive files \n",
|
||||
fprintf(stderr, "Progress: %s %d%% (%lu/%luKB). (%d/%d)tablespaces. Receive files \n",
|
||||
progressBar, percent, totalsize, totalsize, g_curTableSpace, g_totalTableSpace);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ pgBackupValidate(pgBackup *backup, pgRestoreParams *params)
|
||||
}
|
||||
|
||||
/* setup threads */
|
||||
for (i = 0; (size_t)i < g_totalFiles; i++)
|
||||
for (i = 0; i < g_totalFiles; i++)
|
||||
{
|
||||
pgFile *file = (pgFile *) parray_get(files, i);
|
||||
pg_atomic_clear_flag(&file->lock);
|
||||
|
||||
@ -1337,7 +1337,7 @@ static void *ProgressReportIncrementalBuild(void *arg)
|
||||
/* progress report */
|
||||
percent = (int)(fetch_done * 100 / fetch_size);
|
||||
GenerateProgressBar(percent, progressBar);
|
||||
fprintf(stderr, "Progress: %s %d%% (%d/%dKB). fetch files \r",
|
||||
fprintf(stderr, "Progress: %s %d%% (%lu/%luKB). fetch files \r",
|
||||
progressBar, percent, fetch_done, fetch_size);
|
||||
pthread_mutex_lock(&g_mutex);
|
||||
timespec timeout;
|
||||
@ -1355,7 +1355,7 @@ static void *ProgressReportIncrementalBuild(void *arg)
|
||||
} while ((fetch_done < fetch_size) && !g_progressFlag);
|
||||
percent = 100;
|
||||
GenerateProgressBar(percent, progressBar);
|
||||
fprintf(stderr, "Progress: %s %d%% (%d/%dKB). fetch files \n",
|
||||
fprintf(stderr, "Progress: %s %d%% (%lu/%luKB). fetch files \n",
|
||||
progressBar, percent, fetch_done, fetch_size);
|
||||
return nullptr;
|
||||
}
|
||||
@ -159,7 +159,6 @@ void progress_report(bool force)
|
||||
GaussState g_state;
|
||||
int elapsed_secs = 0;
|
||||
int caculate_secs = 0;
|
||||
static bool print = true;
|
||||
|
||||
now = (pg_time_t)time(NULL);
|
||||
percent = fetch_size ? (int)((fetch_done)*100 / fetch_size) : 0;
|
||||
|
||||
Reference in New Issue
Block a user