Skip to content

Commit

Permalink
Mark mtbl_fileset_partition for deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
cmikk committed Nov 28, 2022
1 parent 08647ad commit b44f04f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion man/mtbl_fileset.3
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Accesses via the \fBmtbl_source\fR(3) interface will implicitly check for update
.sp
The \fBmtbl_fileset_reload\fR() function avoids checking for updates more frequently than every \fIreload_interval\fR seconds\&. If \fBreload_interval\fR is set to \fBMTBL_FILESET_RELOAD_INTERVAL_NEVER\fR, then \fBmtbl_fileset_reload\fR() function will only load the fileset once\&. The \fBmtbl_fileset_reload_now\fR() function can be called to bypass the \fIreload_interval\fR check\&.
.sp
The \fBmtbl_fileset_partition\fR() function yields two \fBstruct mtbl_merger\fR objects that are split based on the output of a callback\&. The caller is responsible for calling \fBmtbl_merger_destroy\fR() on each of these mergers\&. Calls to \fBmtbl_source_*\fR() on the fileset\(cqs source object, and calls to \fBmtbl_fileset_reload\fR() and \fBmtbl_fileset_reload_now\fR() may leave these mergers in an inconsistent state\&.
The \fBmtbl_fileset_partition\fR() function yields two \fBstruct mtbl_merger\fR objects that are split based on the output of a callback\&. The caller is responsible for calling \fBmtbl_merger_destroy\fR() on each of these mergers\&. Calls to \fBmtbl_source_*\fR() on the fileset\(cqs source object, and calls to \fBmtbl_fileset_reload\fR() and \fBmtbl_fileset_reload_now\fR(), including those implicitly performed by operations on the fileset source, may leave these mergers in an inconsistent state\&. For this reason, \fBmtbl_fileset_partition\fR() use is deprecated in favor of \fBmtbl_fileset_dup\fR() with the \fBfname_filter_func\fR option set\&.
.SS "Fileset options"
.sp
.it 1 an-trap
Expand Down
7 changes: 5 additions & 2 deletions man/mtbl_fileset.3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,11 @@ The ^mtbl_fileset_partition^() function yields two ^struct mtbl_merger^
objects that are split based on the output of a callback. The caller is
responsible for calling ^mtbl_merger_destroy^() on each of these mergers.
Calls to ^mtbl_source_*^() on the fileset's source object, and calls to
^mtbl_fileset_reload^() and ^mtbl_fileset_reload_now^() may leave these
mergers in an inconsistent state.
^mtbl_fileset_reload^() and ^mtbl_fileset_reload_now^(), including those
implicitly performed by operations on the fileset source, may leave these
mergers in an inconsistent state. For this reason, ^mtbl_fileset_partition^()
use is deprecated in favor of ^mtbl_fileset_dup^() with the ^fname_filter_func^
option set.

=== Fileset options ===

Expand Down
1 change: 1 addition & 0 deletions mtbl/mtbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ mtbl_fileset_reload_now(struct mtbl_fileset *);
const struct mtbl_source *
mtbl_fileset_source(struct mtbl_fileset *);

/* Deprecated: use mtbl_fileset_dup instead. */
void
mtbl_fileset_partition(struct mtbl_fileset *,
mtbl_filename_filter_func,
Expand Down

0 comments on commit b44f04f

Please sign in to comment.