summaryrefslogtreecommitdiffstats
path: root/database/engine/datafile.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:08 +0000
commit81581f9719bc56f01d5aa08952671d65fda9867a (patch)
tree0f5c6b6138bf169c23c9d24b1fc0a3521385cb18 /database/engine/datafile.c
parentReleasing debian version 1.38.1-1. (diff)
downloadnetdata-81581f9719bc56f01d5aa08952671d65fda9867a.tar.xz
netdata-81581f9719bc56f01d5aa08952671d65fda9867a.zip
Merging upstream version 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 286ae1e30..8c413d8dc 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;