hanahmily commented on code in PR #332: URL: https://github.com/apache/skywalking-banyandb/pull/332#discussion_r1328093547
########## docs/concept/data-model.md: ########## @@ -198,6 +198,34 @@ tags: `Property` supports a three-level hierarchy, `group`/`name`/`id`, that is more flexible than schemaful data models. +The property supports the TTL mechanism. You could set the `ttl` field to specify the time to live. + +```yaml +metadata: + container: + group: sw + name: ui_template + id: General-Service +tags: +- key: name + value: + str: + value: "hello" +- key: state + value: + str: + value: "succeed" +ttl: "1h" +``` + +"General-Service" will be dropped after 1 hour. If you want to extend the TTL, you could use the "keepalive" operation. The "lease_id" is returned in the apply response. You can use get operation to get the property with the lease_id as well. + +```yaml +lease_id: 1 +``` + +"General-Service" lives another 1 hour. Review Comment: Keepalive operation. https://github.com/apache/skywalking-banyandb/pull/332/files#diff-4b9d7be31734b204e1eecbc36ab19918c1a72267558df92b70e434a1bc9cef62R109 The lease_id is returned from the applying operation: https://github.com/apache/skywalking-banyandb/pull/332/files#diff-4b9d7be31734b204e1eecbc36ab19918c1a72267558df92b70e434a1bc9cef62R48 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
