You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2025/11/27 13:07:21 UTC
(skywalking-banyandb) branch api/tag-field-ttl updated (82ceca1a -> 3e933b39)
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a change to branch api/tag-field-ttl
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
discard 82ceca1a Add stage_names field
new 3e933b39 Add stage_names field
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (82ceca1a)
\
N -- N -- N refs/heads/api/tag-field-ttl (3e933b39)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
api/proto/banyandb/common/v1/common.proto | 1 -
docs/api-reference.md | 4 ++++
2 files changed, 4 insertions(+), 1 deletion(-)
(skywalking-banyandb) 01/01: Add stage_names field
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch api/tag-field-ttl
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
commit 3e933b3980977803e990b35a7a29f3b69ad8e5e6
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Thu Nov 27 10:30:25 2025 +0000
Add stage_names field
Add the field to TagFamilySpec, TagSpec, FieldSpec, and TraceTagSpec
for lifecycle stage retention control
---
api/proto/banyandb/database/v1/schema.proto | 26 ++++++++++++++++++++++++++
docs/api-reference.md | 4 ++++
2 files changed, 30 insertions(+)
diff --git a/api/proto/banyandb/database/v1/schema.proto b/api/proto/banyandb/database/v1/schema.proto
index d2359418..0fa0af7e 100644
--- a/api/proto/banyandb/database/v1/schema.proto
+++ b/api/proto/banyandb/database/v1/schema.proto
@@ -42,11 +42,29 @@ message TagFamilySpec {
string name = 1 [(validate.rules).string.min_len = 1];
// tags defines accepted tags
repeated TagSpec tags = 2 [(validate.rules).repeated.min_items = 1];
+ // stage_names defines which lifecycle stages this tag family is retained in.
+ // If empty, the tag family is retained in all stages.
+ // Each value must match the name of a LifecycleStage in the parent Group's ResourceOpts.
+ repeated string stage_names = 3;
}
message TagSpec {
string name = 1 [(validate.rules).string.min_len = 1];
TagType type = 2 [(validate.rules).enum.defined_only = true];
+ // stage_names defines which lifecycle stages this tag is retained in.
+ // Semantics with TagFamilySpec.stage_names:
+ // - If TagFamilySpec.stage_names is empty and TagSpec.stage_names is empty,
+ // the tag is retained in all stages.
+ // - If TagFamilySpec.stage_names is non-empty and TagSpec.stage_names is empty,
+ // the tag is retained in all stages listed in TagFamilySpec.stage_names.
+ // - If TagSpec.stage_names is non-empty, the tag is retained only in the
+ // intersection of TagFamilySpec.stage_names (or all stages if that is empty)
+ // and TagSpec.stage_names.
+ // - Implementations SHOULD validate that TagSpec.stage_names does not contain
+ // stages outside TagFamilySpec.stage_names when the latter is non-empty and
+ // reject such schemas as invalid.
+ // Each value must match the name of a LifecycleStage in the parent Group's ResourceOpts.
+ repeated string stage_names = 3;
}
// Stream intends to store streaming data, for example, traces or logs
@@ -97,6 +115,10 @@ message FieldSpec {
EncodingMethod encoding_method = 3 [(validate.rules).enum.defined_only = true];
// compression_method indicates how to compress data during writing
CompressionMethod compression_method = 4 [(validate.rules).enum.defined_only = true];
+ // stage_names defines which lifecycle stages this field is retained in.
+ // If empty, the field is retained in all stages.
+ // Each value must match the name of a LifecycleStage in the parent Group's ResourceOpts.
+ repeated string stage_names = 5;
}
// Measure intends to store data point
@@ -226,6 +248,10 @@ message TraceTagSpec {
string name = 1 [(validate.rules).string.min_len = 1];
// type is the type of the tag.
TagType type = 2 [(validate.rules).enum.defined_only = true];
+ // stage_names defines which lifecycle stages this trace tag is retained in.
+ // If empty, the trace tag is retained in all stages.
+ // Each value must match the name of a LifecycleStage in the parent Group's ResourceOpts.
+ repeated string stage_names = 3;
}
// Trace defines a tracing-specific storage resource.
diff --git a/docs/api-reference.md b/docs/api-reference.md
index ff86ff51..b8482a3b 100644
--- a/docs/api-reference.md
+++ b/docs/api-reference.md
@@ -2284,6 +2284,7 @@ FieldSpec is the specification of field
| field_type | [FieldType](#banyandb-database-v1-FieldType) | | field_type denotes the type of field value |
| encoding_method | [EncodingMethod](#banyandb-database-v1-EncodingMethod) | | encoding_method indicates how to encode data during writing |
| compression_method | [CompressionMethod](#banyandb-database-v1-CompressionMethod) | | compression_method indicates how to compress data during writing |
+| stage_names | [string](#string) | repeated | stage_names defines which lifecycle stages this field is retained in. If empty, the field is retained in all stages. Each value must match the name of a LifecycleStage in the parent Group's ResourceOpts. |
@@ -2431,6 +2432,7 @@ Subject defines which stream or measure would generate indices
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | |
| tags | [TagSpec](#banyandb-database-v1-TagSpec) | repeated | tags defines accepted tags |
+| stage_names | [string](#string) | repeated | stage_names defines which lifecycle stages this tag family is retained in. If empty, the tag family is retained in all stages. Each value must match the name of a LifecycleStage in the parent Group's ResourceOpts. |
@@ -2447,6 +2449,7 @@ Subject defines which stream or measure would generate indices
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | |
| type | [TagType](#banyandb-database-v1-TagType) | | |
+| stage_names | [string](#string) | repeated | stage_names defines which lifecycle stages this tag is retained in. Semantics with TagFamilySpec.stage_names: - If TagFamilySpec.stage_names is empty and TagSpec.stage_names is empty, the tag is retained in all stages. - If TagFamilySpec.stage_names is non-empty and TagSpec.stage_names is empty, the tag is retained in all stages listed in TagFamilySpec.stage_names. - If TagSpec.stage_names is non-empty, the tag is retained only in the inters [...]
@@ -2509,6 +2512,7 @@ TraceTagSpec defines the specification of a tag in a trace.
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | name is the name of the tag. |
| type | [TagType](#banyandb-database-v1-TagType) | | type is the type of the tag. |
+| stage_names | [string](#string) | repeated | stage_names defines which lifecycle stages this trace tag is retained in. If empty, the trace tag is retained in all stages. Each value must match the name of a LifecycleStage in the parent Group's ResourceOpts. |