mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Improve empty RRD files detection for faster recovery
This commit is contained in:
parent
c694035da3
commit
7b6ce10940
2 changed files with 15 additions and 10 deletions
|
|
@ -400,7 +400,7 @@ function driver:append(schema, timestamp, tags, metrics)
|
|||
return false
|
||||
end
|
||||
|
||||
if not ntop.exists(rrdfile) then
|
||||
if not ntop.notEmptyFile(rrdfile) then
|
||||
ntop.mkdir(base)
|
||||
if not create_rrd(schema, rrdfile) then
|
||||
return false
|
||||
|
|
@ -507,7 +507,7 @@ function driver:query(schema, tstart, tend, tags, options)
|
|||
local base, rrd = schema_get_path(schema, tags)
|
||||
local rrdfile = os_utils.fixPath(base .. "/" .. rrd .. ".rrd")
|
||||
|
||||
if not ntop.exists(rrdfile) then
|
||||
if not ntop.notEmptyFile(rrdfile) then
|
||||
return nil
|
||||
end
|
||||
|
||||
|
|
@ -826,7 +826,7 @@ end
|
|||
function driver:queryTotal(schema, tstart, tend, tags, options)
|
||||
local rrdfile = driver.schema_get_full_path(schema, tags)
|
||||
|
||||
if not ntop.exists(rrdfile) then
|
||||
if not ntop.notEmptyFile(rrdfile) then
|
||||
return nil
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue