fix: use us time unit for last fetch time
This commit is contained in:
parent
66c86a60d5
commit
455719befa
|
@ -605,7 +605,7 @@ SUdf *udfdGetOrCreateUdf(const char *udfName) {
|
||||||
int64_t currTime = taosGetTimestampSec();
|
int64_t currTime = taosGetTimestampSec();
|
||||||
bool expired = false;
|
bool expired = false;
|
||||||
if (pUdfHash) {
|
if (pUdfHash) {
|
||||||
expired = currTime - (*pUdfHash)->lastFetchTime > 10 * 1000;
|
expired = currTime - (*pUdfHash)->lastFetchTime > 10 * 1000 * 1000; // 10s
|
||||||
if (!expired) {
|
if (!expired) {
|
||||||
++(*pUdfHash)->refCount;
|
++(*pUdfHash)->refCount;
|
||||||
SUdf *udf = *pUdfHash;
|
SUdf *udf = *pUdfHash;
|
||||||
|
@ -903,7 +903,7 @@ void udfdProcessRpcRsp(void *parent, SRpcMsg *pMsg, SEpSet *pEpSet) {
|
||||||
|
|
||||||
msgInfo->code = udfdSaveFuncBodyToFile(pFuncInfo, udf);
|
msgInfo->code = udfdSaveFuncBodyToFile(pFuncInfo, udf);
|
||||||
if (msgInfo->code == 0) {
|
if (msgInfo->code == 0) {
|
||||||
udf->lastFetchTime = taosGetTimestampMs();
|
udf->lastFetchTime = taosGetTimestampUs();
|
||||||
}
|
}
|
||||||
tFreeSFuncInfo(pFuncInfo);
|
tFreeSFuncInfo(pFuncInfo);
|
||||||
taosArrayDestroy(retrieveRsp.pFuncInfos);
|
taosArrayDestroy(retrieveRsp.pFuncInfos);
|
||||||
|
|
|
@ -22,7 +22,7 @@ class TDTestCase:
|
||||||
tdSql.execute("insert into db.ctb using db.stb tags(1) (ts, c1) values (now, 1)")
|
tdSql.execute("insert into db.ctb using db.stb tags(1) (ts, c1) values (now, 1)")
|
||||||
|
|
||||||
tdSql.query("select count(*) from information_schema.ins_columns")
|
tdSql.query("select count(*) from information_schema.ins_columns")
|
||||||
tdSql.checkData(0, 0, 274)
|
tdSql.checkData(0, 0, 275)
|
||||||
|
|
||||||
tdSql.query("select * from information_schema.ins_columns where table_name = 'ntb'")
|
tdSql.query("select * from information_schema.ins_columns where table_name = 'ntb'")
|
||||||
tdSql.checkRows(14)
|
tdSql.checkRows(14)
|
||||||
|
|
Loading…
Reference in New Issue