This commit is contained in:
Shengliang Guan 2022-02-23 20:39:21 +08:00
parent 4f353da40c
commit 10a21ba801
8 changed files with 41 additions and 9 deletions

View File

@ -59,12 +59,6 @@ extern int64_t tsMaxRetentWindow;
extern uint32_t tsVersion;
// build info
extern char version[];
extern char compatible_version[];
extern char gitinfo[];
extern char gitinfoOfInternal[];
extern char buildinfo[];
// lossy
extern char tsLossyColumns[];

33
include/util/version.h Normal file
View File

@ -0,0 +1,33 @@
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_UTIL_VERSION_H
#define _TD_UTIL_VERSION_H
#ifdef __cplusplus
extern "C" {
#endif
extern char version[];
extern char compatible_version[];
extern char gitinfo[];
extern char gitinfoOfInternal[];
extern char buildinfo[];
#ifdef __cplusplus
}
#endif
#endif /*_TD_UTIL_VERSION_H*/

View File

@ -7,6 +7,7 @@
#include "tmsg.h"
#include "tglobal.h"
#include "catalog.h"
#include "version.h"
#define TSC_VAR_NOT_RELEASE 1
#define TSC_VAR_RELEASED 0

View File

@ -22,6 +22,7 @@
#include "taoserror.h"
#include "tglobal.h"
#include "ulog.h"
#include "version.h"
#ifdef __cplusplus
extern "C" {

View File

@ -21,6 +21,7 @@
#include "mndStb.h"
#include "mndUser.h"
#include "tglobal.h"
#include "version.h"
#define QUERY_ID_SIZE 20
#define QUERY_OBJ_ID_SIZE 18

View File

@ -29,11 +29,11 @@ void taosUpdateTempSpace() { taosGetDiskSize(tsTempDir, &tsTempSpace.size); }
void taosUpdateDataSpace() { taosGetDiskSize(tsDataDir, &tsDataSpace.size); }
bool taosLogSpaceAvailable() { return tsDataSpace.reserved > tsDataSpace.size.avail; }
bool taosLogSpaceAvailable() { return tsLogSpace.reserved < tsLogSpace.size.avail; }
bool taosTempSpaceAvailable() { return tsTempSpace.reserved > tsTempSpace.size.avail; }
bool taosTempSpaceAvailable() { return tsTempSpace.reserved < tsTempSpace.size.avail; }
bool taosDataSpaceAvailable() { return tsDataSpace.reserved > tsDataSpace.size.avail; }
bool taosDataSpaceAvailable() { return tsDataSpace.reserved < tsDataSpace.size.avail; }
void taosUpdateAllSpace() {
taosUpdateLogSpace();

View File

@ -119,6 +119,7 @@ static int32_t taosStartLog() {
int32_t taosInitLog(const char *logName, int maxFiles) {
if (tsLogInited) return 0;
taosUpdateLogSpace();
char fullName[PATH_MAX] = {0};
snprintf(fullName, PATH_MAX, "%s" TD_DIRSEP "%s", tsLogDir, logName);

View File

@ -20,6 +20,7 @@
#include "shellCommand.h"
#include "tkey.h"
#include "ulog.h"
#include "version.h"
#include <wordexp.h>
#include <argp.h>