aboutsummaryrefslogtreecommitdiff
path: root/libbrep/common.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-11-20 15:17:26 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2024-11-26 10:39:50 +0200
commitf7f899aabfa43515ae645d16b9b94738eed4d07d (patch)
tree4e08c4fa6f62311f7476fbf86fca61b8d86deb9d /libbrep/common.hxx
parentae9c34d3256de0edb53d6965969ae740e63be82d (diff)
Add support for tenant service reference count
Diffstat (limited to 'libbrep/common.hxx')
-rw-r--r--libbrep/common.hxx7
1 files changed, 6 insertions, 1 deletions
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<string> data;
tenant_service () = default;
tenant_service (string i, string t, optional<string> 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.