version
This commit is contained in:
parent
4f353da40c
commit
10a21ba801
|
@ -59,12 +59,6 @@ extern int64_t tsMaxRetentWindow;
|
||||||
|
|
||||||
extern uint32_t tsVersion;
|
extern uint32_t tsVersion;
|
||||||
|
|
||||||
// build info
|
|
||||||
extern char version[];
|
|
||||||
extern char compatible_version[];
|
|
||||||
extern char gitinfo[];
|
|
||||||
extern char gitinfoOfInternal[];
|
|
||||||
extern char buildinfo[];
|
|
||||||
|
|
||||||
// lossy
|
// lossy
|
||||||
extern char tsLossyColumns[];
|
extern char tsLossyColumns[];
|
||||||
|
|
|
@ -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*/
|
|
@ -7,6 +7,7 @@
|
||||||
#include "tmsg.h"
|
#include "tmsg.h"
|
||||||
#include "tglobal.h"
|
#include "tglobal.h"
|
||||||
#include "catalog.h"
|
#include "catalog.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#define TSC_VAR_NOT_RELEASE 1
|
#define TSC_VAR_NOT_RELEASE 1
|
||||||
#define TSC_VAR_RELEASED 0
|
#define TSC_VAR_RELEASED 0
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "taoserror.h"
|
#include "taoserror.h"
|
||||||
#include "tglobal.h"
|
#include "tglobal.h"
|
||||||
#include "ulog.h"
|
#include "ulog.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "mndStb.h"
|
#include "mndStb.h"
|
||||||
#include "mndUser.h"
|
#include "mndUser.h"
|
||||||
#include "tglobal.h"
|
#include "tglobal.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#define QUERY_ID_SIZE 20
|
#define QUERY_ID_SIZE 20
|
||||||
#define QUERY_OBJ_ID_SIZE 18
|
#define QUERY_OBJ_ID_SIZE 18
|
||||||
|
|
|
@ -29,11 +29,11 @@ void taosUpdateTempSpace() { taosGetDiskSize(tsTempDir, &tsTempSpace.size); }
|
||||||
|
|
||||||
void taosUpdateDataSpace() { taosGetDiskSize(tsDataDir, &tsDataSpace.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() {
|
void taosUpdateAllSpace() {
|
||||||
taosUpdateLogSpace();
|
taosUpdateLogSpace();
|
||||||
|
|
|
@ -119,6 +119,7 @@ static int32_t taosStartLog() {
|
||||||
|
|
||||||
int32_t taosInitLog(const char *logName, int maxFiles) {
|
int32_t taosInitLog(const char *logName, int maxFiles) {
|
||||||
if (tsLogInited) return 0;
|
if (tsLogInited) return 0;
|
||||||
|
taosUpdateLogSpace();
|
||||||
|
|
||||||
char fullName[PATH_MAX] = {0};
|
char fullName[PATH_MAX] = {0};
|
||||||
snprintf(fullName, PATH_MAX, "%s" TD_DIRSEP "%s", tsLogDir, logName);
|
snprintf(fullName, PATH_MAX, "%s" TD_DIRSEP "%s", tsLogDir, logName);
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "shellCommand.h"
|
#include "shellCommand.h"
|
||||||
#include "tkey.h"
|
#include "tkey.h"
|
||||||
#include "ulog.h"
|
#include "ulog.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#include <wordexp.h>
|
#include <wordexp.h>
|
||||||
#include <argp.h>
|
#include <argp.h>
|
||||||
|
|
Loading…
Reference in New Issue