hanahmily commented on code in PR #332: URL: https://github.com/apache/skywalking-banyandb/pull/332#discussion_r1328093682
########## 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: and If you want to get the lease_id separately, the get operation will help as the document mentioned. -- 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]
