Skip to content

Commit

Permalink
Warning to Deprecate Partial Vacuuming in libtiledb 2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenv committed Feb 28, 2022
1 parent 17c9e0c commit 72a9062
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* TileDB-Py 0.12.3 includes TileDB Embedded [TileDB 2.6.3](https://github.com/TileDB-Inc/TileDB/releases/tag/2.6.3)

## API Changes
* Deprecate partial vacuuming []()
* Deprecate partial vacuuming [#930](https://github.com/TileDB-Inc/TileDB-Py/pull/930)

# TileDB-Py 0.12.3 Release Notes

Expand Down
16 changes: 13 additions & 3 deletions tiledb/libtiledb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -7112,10 +7112,20 @@ def vacuum(uri, Config config=None, Ctx ctx=None, timestamp=None):
ctx = default_ctx()

if timestamp:
warnings.warn("Partial vacuuming is no longer supported. Remove "
"`timestamp` argument. No fragments have been vacuumed.",
warnings.warn("Partial vacuuming will no longer be "
"supported in 0.14 / libtiledb 2.8",
DeprecationWarning)
return

if config is None:
config = Config()

if not isinstance(timestamp, tuple) and len(timestamp) != 2:
raise TypeError("'timestamp' argument expects tuple(start: int, end: int)")

if timestamp[0] is not None:
config["sm.vacuum.timestamp_start"] = timestamp[0]
if timestamp[1] is not None:
config["sm.vacuum.timestamp_end"] = timestamp[1]

ctx_ptr = ctx.ptr
config_ptr = config.ptr if config is not None else NULL
Expand Down

0 comments on commit 72a9062

Please sign in to comment.