From 475771f84d3fb6197fea772d67e5a59c46b512e5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 20 Nov 2024 15:17:26 +0200 Subject: Add support for tenant service reference count --- libbrep/common.hxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libbrep/common.hxx') diff --git a/libbrep/common.hxx b/libbrep/common.hxx index d2009f5..22302f3 100644 --- a/libbrep/common.hxx +++ b/libbrep/common.hxx @@ -543,17 +543,22 @@ namespace brep // // Note that the {id, type} pair must be unique. // + // The reference count is used to keep track of the number of attempts to + // create a duplicate tenant with this {id, type} (see ci_start::create() + // for details). + // #pragma db value struct tenant_service { string id; string type; + uint64_t ref_count; optional data; tenant_service () = default; tenant_service (string i, string t, optional d = nullopt) - : id (move (i)), type (move (t)), data (move (d)) {} + : id (move (i)), type (move (t)), ref_count (1), data (move (d)) {} }; // Version comparison operators. -- cgit v1.1