diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-11-20 15:17:26 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-12-10 16:44:55 +0200 |
commit | 475771f84d3fb6197fea772d67e5a59c46b512e5 (patch) | |
tree | d3a80f655cb0261d5cfd5728a5159e064050320c /libbrep/common.hxx | |
parent | 40a3855e2341529624050b4324e73e774967111a (diff) |
Add support for tenant service reference count
Diffstat (limited to 'libbrep/common.hxx')
-rw-r--r-- | libbrep/common.hxx | 7 |
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. |