summaryrefslogtreecommitdiffstats
path: root/database/engine/datafile.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:04 +0000
commita836a244a3d2bdd4da1ee2641e3e957850668cea (patch)
treecb87c75b3677fab7144f868435243f864048a1e6 /database/engine/datafile.c
parentAdding upstream version 1.38.1. (diff)
downloadnetdata-a836a244a3d2bdd4da1ee2641e3e957850668cea.tar.xz
netdata-a836a244a3d2bdd4da1ee2641e3e957850668cea.zip
Adding upstream version 1.39.0.upstream/1.39.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database/engine/datafile.c')
-rw-r--r--database/engine/datafile.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/database/engine/datafile.c b/database/engine/datafile.c
index 286ae1e3..8c413d8d 100644
--- a/database/engine/datafile.c
+++ b/database/engine/datafile.c
@@ -34,17 +34,6 @@ static struct rrdengine_datafile *datafile_alloc_and_init(struct rrdengine_insta
return datafile;
}
-void datafile_acquire_dup(struct rrdengine_datafile *df) {
- netdata_spinlock_lock(&df->users.spinlock);
-
- if(!df->users.lockers)
- fatal("DBENGINE: datafile is not acquired to duplicate");
-
- df->users.lockers++;
-
- netdata_spinlock_unlock(&df->users.spinlock);
-}
-
bool datafile_acquire(struct rrdengine_datafile *df, DATAFILE_ACQUIRE_REASONS reason) {
bool ret;
@@ -390,8 +379,8 @@ static int scan_data_files_cmp(const void *a, const void *b)
/* Returns number of datafiles that were loaded or < 0 on error */
static int scan_data_files(struct rrdengine_instance *ctx)
{
- int ret;
- unsigned tier, no, matched_files, i,failed_to_load;
+ int ret, matched_files, failed_to_load, i;
+ unsigned tier, no;
uv_fs_t req;
uv_dirent_t dent;
struct rrdengine_datafile **datafiles, *datafile;