You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "rnewson (via GitHub)" <gi...@apache.org> on 2025/09/15 11:11:03 UTC
[PR] purge deleted documents that exceed TTL [couchdb]
rnewson opened a new pull request, #5655:
URL: https://github.com/apache/couchdb/pull/5655
## Overview
Add a plugin to automatically purge deleted documents after a configurable interval has lapsed. This should be set high enough that all external consumers of the changes feed will have seen and processed the deleted documents. The plugin uses CouchDB's purge facility which ensures internal replication and indexes have processed the deletions before the deleted document is purged.
## Testing recommendations
covered by eunit tests.
## Related Issues or Pull Requests
N/A
## Checklist
- [x] Code is written and works correctly
- [x] Changes are covered by tests
- [x] Any new configurable parameters are documented in `rel/overlay/etc/default.ini`
- [x] Documentation changes were made in the `src/docs` folder
- [ ] Documentation changes were backported (separated PR) to affected branches
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#issuecomment-3314870298
agreed. Once #5672 is merged I'll update this branch to use the props cache
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#issuecomment-3306425831
noting that `get` deliberately just reads the local unsharded `_dbs` db for its answer and `set` tries to ensure the same node in the cluster (lowest live node) does the updates, to avoid conflicts. any update to `_dbs` is replicated in a ring to all nodes. I return a `202` status code as a hint that the write was made but is not yet redundantly stored.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#discussion_r2350089710
##########
src/couch/src/couch_auto_purge_plugin.erl:
##########
@@ -0,0 +1,169 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+-module(couch_auto_purge_plugin).
+-behaviour(couch_scanner_plugin).
+
+-export([
+ start/2,
+ resume/2,
+ complete/1,
+ checkpoint/1,
+ db/2,
+ db_opened/2,
+ db_closing/2,
+ doc_fdi/3
+]).
+
+-include_lib("couch_scanner/include/couch_scanner_plugin.hrl").
+-include_lib("stdlib/include/assert.hrl").
+
+start(ScanId, #{}) ->
+ St = init_config(ScanId),
+ ?INFO("Starting.", [], St),
+ {ok, St}.
+
+resume(ScanId, #{}) ->
+ St = init_config(ScanId),
+ ?INFO("Resuming.", [], St),
+ {ok, St}.
+
+complete(St) ->
+ ?INFO("Completed", [], St),
+ {ok, #{}}.
+
+checkpoint(_St) ->
+ {ok, #{}}.
+
+db(St, DbName) ->
+ case ttl(St, DbName) of
+ TTL when is_integer(TTL) ->
+ {ok, St#{ttl => TTL}};
+ undefined ->
+ {skip, St}
+ end.
+
+db_opened(#{} = St, Db) ->
+ #{ttl := TTL} = St,
+ EndSeq = couch_time_seq:since(couch_db:get_time_seq(Db), couch_time_seq:timestamp() - TTL),
+ ChangeOpts =
+ if
+ EndSeq == now -> [];
+ true -> [{end_key, EndSeq}]
+ end,
+ ?INFO("scanning for deleted documents in ~s up to ~p", [couch_db:name(Db), EndSeq], meta(St)),
+ {0, ChangeOpts, St#{count => 0, end_seq => EndSeq}}.
+
+db_closing(#{} = St, Db) ->
+ #{count := Count} = St,
+ ?INFO("purged ~B deleted documents from ~s", [Count, couch_db:name(Db)], meta(St)),
+ {ok, St}.
+
+doc_fdi(#{} = St, #full_doc_info{deleted = true} = FDI, Db) ->
+ #{end_seq := EndSeq} = St,
+ ?assert(
+ FDI#full_doc_info.update_seq =< EndSeq, "FDI update_seq should not be greater than end seq"
+ ),
+ {ok, purge(St, FDI, Db)};
+doc_fdi(#{} = St, #full_doc_info{}, _Db) ->
+ {ok, St}.
+
+purge(#{} = St, #full_doc_info{} = FDI, Db) ->
Review Comment:
Related to a minor comment below we could get the `Id` in the function head `#full_doc_info{id = Id} = FDI` so then `fdi_to_revs` can just return the revs only this can be just a two liner with `purge(St, Id, fdi_to_revs(FD), MaxBatchSize, Db)`
But either way is fine, if this looks better to you, that's fine, too
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#discussion_r2350078553
##########
src/couch/src/couch_auto_purge_plugin.erl:
##########
@@ -0,0 +1,169 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+-module(couch_auto_purge_plugin).
+-behaviour(couch_scanner_plugin).
+
+-export([
+ start/2,
+ resume/2,
+ complete/1,
+ checkpoint/1,
+ db/2,
+ db_opened/2,
+ db_closing/2,
+ doc_fdi/3
+]).
+
+-include_lib("couch_scanner/include/couch_scanner_plugin.hrl").
+-include_lib("stdlib/include/assert.hrl").
+
+start(ScanId, #{}) ->
+ St = init_config(ScanId),
+ ?INFO("Starting.", [], St),
+ {ok, St}.
+
+resume(ScanId, #{}) ->
+ St = init_config(ScanId),
+ ?INFO("Resuming.", [], St),
+ {ok, St}.
+
+complete(St) ->
+ ?INFO("Completed", [], St),
+ {ok, #{}}.
+
+checkpoint(_St) ->
+ {ok, #{}}.
+
+db(St, DbName) ->
+ case ttl(St, DbName) of
+ TTL when is_integer(TTL) ->
+ {ok, St#{ttl => TTL}};
+ undefined ->
+ {skip, St}
+ end.
+
+db_opened(#{} = St, Db) ->
+ #{ttl := TTL} = St,
+ EndSeq = couch_time_seq:since(couch_db:get_time_seq(Db), couch_time_seq:timestamp() - TTL),
+ ChangeOpts =
+ if
+ EndSeq == now -> [];
+ true -> [{end_key, EndSeq}]
+ end,
+ ?INFO("scanning for deleted documents in ~s up to ~p", [couch_db:name(Db), EndSeq], meta(St)),
+ {0, ChangeOpts, St#{count => 0, end_seq => EndSeq}}.
+
+db_closing(#{} = St, Db) ->
+ #{count := Count} = St,
+ ?INFO("purged ~B deleted documents from ~s", [Count, couch_db:name(Db)], meta(St)),
+ {ok, St}.
+
+doc_fdi(#{} = St, #full_doc_info{deleted = true} = FDI, Db) ->
+ #{end_seq := EndSeq} = St,
+ ?assert(
+ FDI#full_doc_info.update_seq =< EndSeq, "FDI update_seq should not be greater than end seq"
+ ),
+ {ok, purge(St, FDI, Db)};
+doc_fdi(#{} = St, #full_doc_info{}, _Db) ->
+ {ok, St}.
+
+purge(#{} = St, #full_doc_info{} = FDI, Db) ->
+ {Id, Revs} = fdi_to_idrevs(FDI),
+ MaxBatchSize = config:get_integer(atom_to_list(?MODULE), "max_batch_size", 500),
+ purge(St, Id, Revs, MaxBatchSize, Db).
+
+purge(#{} = St, Id, Revs, MaxBatchSize, Db) when length(Revs) =< MaxBatchSize ->
+ DbName = mem3:dbname(couch_db:name(Db)),
+ PurgeFun = fun() -> fabric:purge_docs(DbName, [{Id, Revs}], [?ADMIN_CTX]) end,
+ Timeout = fabric_util:request_timeout(),
+ try fabric_util:isolate(PurgeFun, Timeout) of
+ {Health, Results} when Health == ok; Health == accepted ->
+ #{count := Count, limiter := Limiter0} = St,
+ {Wait, Limiter1} = couch_scanner_rate_limiter:update(
+ Limiter0, doc_write, length(Results)
+ ),
+ timer:sleep(Wait),
+ St#{count => Count + length(Results), limiter => Limiter1};
+ Else ->
+ ?WARN(
+ "Failed to purge deleted documents in ~s/~s for reason ~p",
+ [DbName, Id, Else],
+ meta(St)
+ ),
+ St
+ catch
+ Class:Reason ->
+ ?WARN(
+ "Failed to purge deleted documents in ~s/~s for reason ~p:~p",
+ [DbName, Id, Class, Reason],
+ meta(St)
+ ),
+ St
+ end;
+purge(#{} = St0, Id, Revs, MaxBatchSize, Db) ->
+ {RevBatch, RevRest} = lists:split(MaxBatchSize, Revs),
+ St1 = purge(St0, Id, RevBatch, MaxBatchSize, Db),
+ purge(St1, Id, RevRest, MaxBatchSize, Db).
+
+fdi_to_idrevs(#full_doc_info{} = FDI) ->
+ Revs = [
+ couch_doc:rev_to_str({Pos, RevId})
+ || {#leaf{}, {Pos, [RevId | _]}} <- couch_key_tree:get_all_leafs(FDI#full_doc_info.rev_tree)
+ ],
+ {FDI#full_doc_info.id, Revs}.
Review Comment:
As a tiny nit: we could fetch the .id before calling this so this could be just returning the `[couch-doc:rev_to_str()....]`, in other words just the revs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#issuecomment-3291636410
Draft as I still need to do a better database-level config for the override.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#issuecomment-3314648897
Looking at `props` from the shard map, it seems silly to store the db props as Q*N duplicates in shards, so I updated them to be stored only once in a separate ets table in the cache: https://github.com/apache/couchdb/pull/5672
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#issuecomment-3308152266
Yeah something like get/set can work and agree I am not a fan of how `props` is spread over all `#shard{}` copies in the shards cache, ideally it should be something like `dbname -> props` as a new mem3 cache (ets table). But it would be good ,I think, to have a general well working `props` and maybe like we discussed in the couchdb meeting even use security for it and get a nice optimization boost from not having to deal with get_db any longer.
Props also has a bit of an extra benefit that it will automatically show up in the dbs_info result so users can inspect them the flags.
So far I have been trying to extract the "update shard map" bit from mem3_reshard and make it a general utility. It's got some resharding specific bits in there and perhaps extra belts and suspenders like for instance:
* before making the change the leader (first live node), pull changes from other nodes
* after the change it force pushes the changes to all the nodes
* there is a wait to propagate step where we wait for the change to take effect on other nodes
Some of theses are there to protect against creating conflicts or handle the case where the ring may have just broken and such but maybe some of it overkill, too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#discussion_r2359699869
##########
src/couch/src/couch_auto_purge_plugin.erl:
##########
@@ -0,0 +1,169 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+-module(couch_auto_purge_plugin).
+-behaviour(couch_scanner_plugin).
+
+-export([
+ start/2,
+ resume/2,
+ complete/1,
+ checkpoint/1,
+ db/2,
+ db_opened/2,
+ db_closing/2,
+ doc_fdi/3
+]).
+
+-include_lib("couch_scanner/include/couch_scanner_plugin.hrl").
+-include_lib("stdlib/include/assert.hrl").
+
+start(ScanId, #{}) ->
+ St = init_config(ScanId),
+ ?INFO("Starting.", [], St),
+ {ok, St}.
+
+resume(ScanId, #{}) ->
+ St = init_config(ScanId),
+ ?INFO("Resuming.", [], St),
+ {ok, St}.
+
+complete(St) ->
+ ?INFO("Completed", [], St),
+ {ok, #{}}.
+
+checkpoint(_St) ->
+ {ok, #{}}.
+
+db(St, DbName) ->
+ case ttl(St, DbName) of
+ TTL when is_integer(TTL) ->
+ {ok, St#{ttl => TTL}};
+ undefined ->
+ {skip, St}
+ end.
+
+db_opened(#{} = St, Db) ->
+ #{ttl := TTL} = St,
+ EndSeq = couch_time_seq:since(couch_db:get_time_seq(Db), couch_time_seq:timestamp() - TTL),
+ ChangeOpts =
+ if
+ EndSeq == now -> [];
+ true -> [{end_key, EndSeq}]
+ end,
+ ?INFO("scanning for deleted documents in ~s up to ~p", [couch_db:name(Db), EndSeq], meta(St)),
+ {0, ChangeOpts, St#{count => 0, end_seq => EndSeq}}.
+
+db_closing(#{} = St, Db) ->
+ #{count := Count} = St,
+ ?INFO("purged ~B deleted documents from ~s", [Count, couch_db:name(Db)], meta(St)),
+ {ok, St}.
+
+doc_fdi(#{} = St, #full_doc_info{deleted = true} = FDI, Db) ->
+ #{end_seq := EndSeq} = St,
+ ?assert(
+ FDI#full_doc_info.update_seq =< EndSeq, "FDI update_seq should not be greater than end seq"
+ ),
+ {ok, purge(St, FDI, Db)};
+doc_fdi(#{} = St, #full_doc_info{}, _Db) ->
+ {ok, St}.
+
+purge(#{} = St, #full_doc_info{} = FDI, Db) ->
Review Comment:
That makes sense, agree.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#discussion_r2350070266
##########
src/docs/src/config/scanner.rst:
##########
@@ -249,3 +249,12 @@ settings in their ``[{plugin}]`` section.
[couch_scanner_plugin_ddoc_features]
ddoc_report = false
+
+.. config:section:: couch_auto_purge_plugin :: Configure the Auto Purge plugin
+
+ .. config:option:: deleted_document_ttl
Review Comment:
I like the name. Previously when discussing this we used the term tombstones, which it was descriptive it would be a new term for users to learn.
In the future it would be easier to also have a `deleted_conflict_ttl` which could be handled by the purge mechanism.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson merged PR #5655:
URL: https://github.com/apache/couchdb/pull/5655
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#issuecomment-3293923883
This look pretty compact!
Draft as I still need to do a better database-level config for the override.
I'll look into adding a way to set and gets for the database level config. Hopefully as properties in the shard docs. We have some precent in resharding when we update the shard map: https://github.com/apache/couchdb/blob/9133232ad3cca3606b7f8ffb1185858631429ac0/src/mem3/src/mem3_reshard_dbdoc.erl#L32
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on code in PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#discussion_r2358168991
##########
src/couch/src/couch_auto_purge_plugin.erl:
##########
@@ -0,0 +1,169 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+-module(couch_auto_purge_plugin).
+-behaviour(couch_scanner_plugin).
+
+-export([
+ start/2,
+ resume/2,
+ complete/1,
+ checkpoint/1,
+ db/2,
+ db_opened/2,
+ db_closing/2,
+ doc_fdi/3
+]).
+
+-include_lib("couch_scanner/include/couch_scanner_plugin.hrl").
+-include_lib("stdlib/include/assert.hrl").
+
+start(ScanId, #{}) ->
+ St = init_config(ScanId),
+ ?INFO("Starting.", [], St),
+ {ok, St}.
+
+resume(ScanId, #{}) ->
+ St = init_config(ScanId),
+ ?INFO("Resuming.", [], St),
+ {ok, St}.
+
+complete(St) ->
+ ?INFO("Completed", [], St),
+ {ok, #{}}.
+
+checkpoint(_St) ->
+ {ok, #{}}.
+
+db(St, DbName) ->
+ case ttl(St, DbName) of
+ TTL when is_integer(TTL) ->
+ {ok, St#{ttl => TTL}};
+ undefined ->
+ {skip, St}
+ end.
+
+db_opened(#{} = St, Db) ->
+ #{ttl := TTL} = St,
+ EndSeq = couch_time_seq:since(couch_db:get_time_seq(Db), couch_time_seq:timestamp() - TTL),
+ ChangeOpts =
+ if
+ EndSeq == now -> [];
+ true -> [{end_key, EndSeq}]
+ end,
+ ?INFO("scanning for deleted documents in ~s up to ~p", [couch_db:name(Db), EndSeq], meta(St)),
+ {0, ChangeOpts, St#{count => 0, end_seq => EndSeq}}.
+
+db_closing(#{} = St, Db) ->
+ #{count := Count} = St,
+ ?INFO("purged ~B deleted documents from ~s", [Count, couch_db:name(Db)], meta(St)),
+ {ok, St}.
+
+doc_fdi(#{} = St, #full_doc_info{deleted = true} = FDI, Db) ->
+ #{end_seq := EndSeq} = St,
+ ?assert(
+ FDI#full_doc_info.update_seq =< EndSeq, "FDI update_seq should not be greater than end seq"
+ ),
+ {ok, purge(St, FDI, Db)};
+doc_fdi(#{} = St, #full_doc_info{}, _Db) ->
+ {ok, St}.
+
+purge(#{} = St, #full_doc_info{} = FDI, Db) ->
Review Comment:
I feel that it's just a transformation of the full_doc_info record to another form, so just doing half (the more complicated half, admittedly) in a function and then stitching the two halves together at the calling site is just less tidy.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on code in PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#discussion_r2358170807
##########
src/docs/src/config/scanner.rst:
##########
@@ -249,3 +249,12 @@ settings in their ``[{plugin}]`` section.
[couch_scanner_plugin_ddoc_features]
ddoc_report = false
+
+.. config:section:: couch_auto_purge_plugin :: Configure the Auto Purge plugin
+
+ .. config:option:: deleted_document_ttl
Review Comment:
yes, I like the new name, and it leaves open the possibility of a `document_ttl` too (for non-deleted documents).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] purge deleted documents that exceed TTL [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on PR #5655:
URL: https://github.com/apache/couchdb/pull/5655#issuecomment-3306401939
have added a commit that does the get/set of a database-level override into the _dbs document. I've placed it outside of the "props" object for now, but that's a discussion. I also deliberately _don't_ add this property into the #shard{} records that mem3 would return as I'm trying to establish the database level property as a single value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org