(skywalking) branch master updated: [Break Change] gGRPC metrics exporter unified the metric value type and support labeled metrics. (#12156)
This is an automated email from the ASF dual-hosted git repository. wankai pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/skywalking.git The following commit(s) were added to refs/heads/master by this push: new fe2c4b5f3f [Break Change] gGRPC metrics exporter unified the metric value type and support labeled metrics. (#12156) fe2c4b5f3f is described below commit fe2c4b5f3f87a0b7eb4e57d0f10202e50ba119e9 Author: Wan Kai AuthorDate: Wed Apr 24 14:29:13 2024 +0800 [Break Change] gGRPC metrics exporter unified the metric value type and support labeled metrics. (#12156) --- docs/en/changes/changes.md | 2 +- docs/en/setup/backend/exporter.md | 2 +- .../provider/grpc/GRPCMetricsExporter.java | 191 +++-- .../exporter/src/main/proto/metric-exporter.proto | 26 +-- .../exporter/provider/grpc/GRPCExporterTest.java | 67 ++-- ...ueMetrics.java => MockLabeledValueMetrics.java} | 14 +- .../provider/grpc/MockMetricExportServiceImpl.java | 41 - .../server/exporter/provider/grpc/MockMetrics.java | 2 +- 8 files changed, 222 insertions(+), 123 deletions(-) diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index 45e96452ed..ef10ed66e1 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -105,7 +105,6 @@ - `memory_swap_percentage` -> `memory_virtual_memory_percentage` * Fix/Change UI init setting for Windows Swap -> Virtual Memory * Fix `Memory Swap Usage`/`Virtual Memory Usage` display with UI init.(Linux/Windows) - * Fix inaccurate APISIX metrics. * Fix inaccurate MongoDB Metrics. * Support Apache ActiveMQ server monitoring. @@ -117,6 +116,7 @@ * Fix inaccurate Hierarchy of RabbitMQ Server monitoring metrics. * Fix inaccurate MySQL/MariaDB, Redis, PostgreSQL metrics. * Support DoubleValue,IntValue,BoolValue in OTEL metrics attributes. +* [Break Change] gGRPC metrics exporter unified the metric value type and support labeled metrics. UI diff --git a/docs/en/setup/backend/exporter.md b/docs/en/setup/backend/exporter.md index 2917d09ca8..fd68a4cb01 100644 --- a/docs/en/setup/backend/exporter.md +++ b/docs/en/setup/backend/exporter.md @@ -48,7 +48,7 @@ Return empty list, if you want to export all metrics in the incremental event ty 2. Export implementation. Stream service. All subscribed metrics will be sent here based on the OAP core schedule. Also, if the OAP is deployed as a cluster, -this method will be called concurrently. For metrics value, you need to follow `#type` to choose `#longValue` or `#doubleValue`. +this method will be called concurrently. ## Kafka Exporter ### Trace Kafka Exporter diff --git a/oap-server/exporter/src/main/java/org/apache/skywalking/oap/server/exporter/provider/grpc/GRPCMetricsExporter.java b/oap-server/exporter/src/main/java/org/apache/skywalking/oap/server/exporter/provider/grpc/GRPCMetricsExporter.java index 4693fc51a9..d2b6bda6fd 100644 --- a/oap-server/exporter/src/main/java/org/apache/skywalking/oap/server/exporter/provider/grpc/GRPCMetricsExporter.java +++ b/oap-server/exporter/src/main/java/org/apache/skywalking/oap/server/exporter/provider/grpc/GRPCMetricsExporter.java @@ -26,12 +26,13 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.ReentrantLock; import lombok.extern.slf4j.Slf4j; -import org.apache.skywalking.oap.server.core.analysis.metrics.DoubleValueHolder; +import org.apache.skywalking.oap.server.core.analysis.metrics.DataLabel; +import org.apache.skywalking.oap.server.core.analysis.metrics.DataTable; import org.apache.skywalking.oap.server.core.analysis.metrics.IntValueHolder; +import org.apache.skywalking.oap.server.core.analysis.metrics.LabeledValueHolder; import org.apache.skywalking.oap.server.core.analysis.metrics.LongValueHolder; import org.apache.skywalking.oap.server.core.analysis.metrics.Metrics; import org.apache.skywalking.oap.server.core.analysis.metrics.MetricsMetaInfo; -import org.apache.skywalking.oap.server.core.analysis.metrics.MultiIntValuesHolder; import org.apache.skywalking.oap.server.core.analysis.metrics.WithMetadata; import org.apache.skywalking.oap.server.core.exporter.ExportData; import org.apache.skywalking.oap.server.core.exporter.ExportEvent; @@ -39,16 +40,18 @@ import org.apache.skywalking.oap.server.core.exporter.MetricValuesExportService; import org.apache.skywalking.oap.server.exporter.grpc.EventType; import org.apache.skywalking.oap.server.exporter.grpc.ExportMetricValue; import org.apache.skywalking.oap.server.exporter.grpc.ExportResponse; +import org.apache.skywalking.oap.server.exporter.grpc.KeyValue; import org.apache.skywalking.oap.server.exporter.grpc.MetricExportServiceGrpc; +import org.apache.skywalking.oap.server.exporter.grpc.MetricValue; import org.apache.skywalking.oap.server.exporter.grpc.SubscriptionMetric; import
Re: [PR] [Break Change] gGRPC metrics exporter unified the metric value type and support labeled metrics. [skywalking]
wankai123 merged PR #12156: URL: https://github.com/apache/skywalking/pull/12156 -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] Polish block dosc [skywalking-banyandb]
wu-sheng opened a new pull request, #437: URL: https://github.com/apache/skywalking-banyandb/pull/437 - [ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Fixes apache/skywalking#. - [ ] Update the [`CHANGES` log](https://github.com/apache/skywalking-banyandb/blob/main/CHANGES.md). -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(skywalking-banyandb) 01/01: Polish block dosc
This is an automated email from the ASF dual-hosted git repository. wusheng pushed a commit to branch wu-sheng-patch-1 in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git commit 988aa8f9e5986b7a912bf58b8c40d4ce54858989 Author: 吴晟 Wu Sheng AuthorDate: Wed Apr 24 22:29:26 2024 +0800 Polish block dosc --- docs/concept/tsdb.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/concept/tsdb.md b/docs/concept/tsdb.md index 331afa4a..6d290bcc 100644 --- a/docs/concept/tsdb.md +++ b/docs/concept/tsdb.md @@ -22,7 +22,7 @@ Within a part, data is split into multiple files in a columnar manner. The times In addition, each part maintains several metadata files. Among them, `metadata.json` is the metadata file for the part, storing descriptive information, such as start and end times, part size, etc. -The `meta.bin` is a skipping index file serves as the entry file for the entire part, helping to index the `primary.bin` file. +The `meta.bin` is a skipping index file that serves as the entry file for the entire part, helping to index the `primary.bin` file. The `primary.bin` file contains the index of each [block](#Block). Through it, the actual data files or the tagFamily metadata files ending with `.tfm` can be indexed, which in turn helps to locate the data in blocks. @@ -33,7 +33,8 @@ Notably, for data of the `Stream` type, since there are no field columns, the `f ## Block -The diagram below shows the detailed fields within each block. The block is the minimal unit of tsdb, which contains several rows of data. Due to the column-based design, each block is spread over several files. +Each block holds data with the same series ID. The max size of the block is controlled by data volume(2MB) and the number(8k) of rows. The size of each measure row is small, number-of-row policy works, meanwhile, the data-volume policy controls the block of stream. +The diagram below shows the detailed fields within each block. The block is the minimal unit of TSDB, which contains several rows of data. Due to the column-based design, each block is spread over several files. ![measure-block](https://skywalking.apache.org/doc-graph/banyandb/v0.6.0/measure-block.png) ![stream-block](https://skywalking.apache.org/doc-graph/banyandb/v0.6.0/stream-block.png)
(skywalking-banyandb) branch wu-sheng-patch-1 created (now 988aa8f9)
This is an automated email from the ASF dual-hosted git repository. wusheng pushed a change to branch wu-sheng-patch-1 in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git at 988aa8f9 Polish block dosc This branch includes the following new commits: new 988aa8f9 Polish block dosc 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.
Re: [PR] Add document for column-based storage [skywalking-banyandb]
wu-sheng commented on PR #435: URL: https://github.com/apache/skywalking-banyandb/pull/435#issuecomment-2074926412 > The images are kind of coupled with the website, if someone can't really access website url in their offline local doc the images are not loadable right? No, they are not. But the good part is, the size of the git repo of source codes are very limited, this would be helpful for the developers. -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(skywalking-banyandb) branch main updated: Polish block docs (#437)
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git The following commit(s) were added to refs/heads/main by this push: new bf6c0996 Polish block docs (#437) bf6c0996 is described below commit bf6c09966ea2d62b1032ac26a86b307d11a479af Author: 吴晟 Wu Sheng AuthorDate: Wed Apr 24 22:48:10 2024 +0800 Polish block docs (#437) * Polish block dosc * Update tsdb.md --- docs/concept/tsdb.md | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/concept/tsdb.md b/docs/concept/tsdb.md index 331afa4a..e6505a43 100644 --- a/docs/concept/tsdb.md +++ b/docs/concept/tsdb.md @@ -22,7 +22,7 @@ Within a part, data is split into multiple files in a columnar manner. The times In addition, each part maintains several metadata files. Among them, `metadata.json` is the metadata file for the part, storing descriptive information, such as start and end times, part size, etc. -The `meta.bin` is a skipping index file serves as the entry file for the entire part, helping to index the `primary.bin` file. +The `meta.bin` is a skipping index file that serves as the entry file for the entire part, helping to index the `primary.bin` file. The `primary.bin` file contains the index of each [block](#Block). Through it, the actual data files or the tagFamily metadata files ending with `.tfm` can be indexed, which in turn helps to locate the data in blocks. @@ -33,7 +33,9 @@ Notably, for data of the `Stream` type, since there are no field columns, the `f ## Block -The diagram below shows the detailed fields within each block. The block is the minimal unit of tsdb, which contains several rows of data. Due to the column-based design, each block is spread over several files. +Each block holds data with the same series ID. +The max size of the measure block is controlled by data volume and the number of rows. Meanwhile, the max size of the stream block is controlled by data volume. +The diagram below shows the detailed fields within each block. The block is the minimal unit of TSDB, which contains several rows of data. Due to the column-based design, each block is spread over several files. ![measure-block](https://skywalking.apache.org/doc-graph/banyandb/v0.6.0/measure-block.png) ![stream-block](https://skywalking.apache.org/doc-graph/banyandb/v0.6.0/stream-block.png)
(skywalking-website) branch asf-site updated: deploy: 925d5afcfccce06b24403210d55b9f4d914f63cd
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/skywalking-website.git The following commit(s) were added to refs/heads/asf-site by this push: new 1c20e038a52 deploy: 925d5afcfccce06b24403210d55b9f4d914f63cd 1c20e038a52 is described below commit 1c20e038a5211c3f562448212c8934a4abeb4549 Author: wu-sheng AuthorDate: Wed Apr 24 13:31:58 2024 + deploy: 925d5afcfccce06b24403210d55b9f4d914f63cd --- contributors/index.html| 2 +- .../next/api-reference/index.html | 2 +- docs/skywalking-banyandb/next/clients/index.html | 2 +- .../next/concept/clustering/index.html | 2 +- .../next/concept/data-model/index.html | 2 +- .../next/concept/persistence-storage/index.html| 2 +- .../next/concept/tsdb/index.html | 46 ++ .../skywalking-banyandb/next/crud/group/index.html | 2 +- .../next/crud/index_rule/index.html| 2 +- .../next/crud/index_rule_binding/index.html| 2 +- .../next/crud/measure/query/index.html | 2 +- .../next/crud/measure/schema/index.html| 2 +- .../next/crud/property/index.html | 2 +- .../next/crud/stream/query/index.html | 2 +- .../next/crud/stream/schema/index.html | 2 +- .../next/installation/binaries/index.html | 4 +- .../next/installation/cluster/index.html | 2 +- .../next/installation/index.html | 4 +- .../next/installation/standalone/index.html| 2 +- .../next/observability/index.html | 2 +- docs/skywalking-banyandb/next/readme/index.html| 2 +- docs/skywalking-banyandb/next/release/index.html | 4 +- index.json | 2 +- searchindex.json | 2 +- 24 files changed, 55 insertions(+), 43 deletions(-) diff --git a/contributors/index.html b/contributors/index.html index 0c152ebbda2..6f516ffacc8 100644 --- a/contributors/index.html +++ b/contributors/index.html @@ -20631,7 +20631,7 @@ -15 +16 5 diff --git a/docs/skywalking-banyandb/next/api-reference/index.html b/docs/skywalking-banyandb/next/api-reference/index.html index 5a6cfe143ce..8ef14018308 100644 --- a/docs/skywalking-banyandb/next/api-reference/index.html +++ b/docs/skywalking-banyandb/next/api-reference/index.html @@ -582,7 +582,7 @@ Table of Contents banyandb/cluster/v1/rpc.proto })() - Commit Id: 6ecbd14 + Commit Id: b8bcf96 diff --git a/docs/skywalking-banyandb/next/clients/index.html b/docs/skywalking-banyandb/next/clients/index.html index 284a0e67381..3b25ba6869b 100644 --- a/docs/skywalking-banyandb/next/clients/index.html +++ b/docs/skywalking-banyandb/next/clients/index.html @@ -528,7 +528,7 @@ These are several ways to install: })() - Commit Id: 6ecbd14 + Commit Id: b8bcf96 diff --git a/docs/skywalking-banyandb/next/concept/clustering/index.html b/docs/skywalking-banyandb/next/concept/clustering/index.html index 54bee8ec5f4..d761de131a4 100644 --- a/docs/skywalking-banyandb/next/concept/clustering/index.html +++ b/docs/skywalking-banyandb/next/concept/clustering/index.html @@ -528,7 +528,7 @@ })() - Commit Id: 6ecbd14 + Commit Id: b8bcf96 diff --git a/docs/skywalking-banyandb/next/concept/data-model/index.html b/docs/skywalking-banyandb/next/concept/data-model/index.html index 7dd8c3e0dc3..b5ee4abfb27 100644 --- a/docs/skywalking-banyandb/next/concept/data-model/index.html +++ b/docs/skywalking-banyandb/next/concept/data-model/index.html @@ -531,7 +531,7 @@ Groups Group does not provide a mechanism for isolating groups of resources with })() - Commit Id: 6ecbd14 + Commit Id: b8bcf96 diff --git a/docs/skywalking-banyandb/next/concept/persistence-storage/index.html b/docs/skywalking-banyandb/next/concept/persistence-storage/index.html index 2e78866b500..7b9ada7 100644 --- a/docs/skywalking-banyandb/next/concept/persistence-storage/index.html +++ b/docs/skywalking-banyandb/next/concept/persistence-storage/index.html @@ -522,7 +522,7 @@ })() - Commit Id: 6ecbd14 + Commit Id: b8bcf96 diff --git a/docs/skywalking-banyandb/next/concept/tsdb/index.html b/docs/skywalking-banyandb/next/concept/tsdb/index.html index 821db3346af..45e85d94e9c 100644 --- a/docs/skywalking-banyandb/next/concept/tsdb/index.html +++
(skywalking-banyandb) branch wu-sheng-patch-1 updated (988aa8f9 -> faaef477)
This is an automated email from the ASF dual-hosted git repository. wusheng pushed a change to branch wu-sheng-patch-1 in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git from 988aa8f9 Polish block dosc add faaef477 Update tsdb.md No new revisions were added by this update. Summary of changes: docs/concept/tsdb.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Re: [PR] Polish block docs [skywalking-banyandb]
hanahmily commented on code in PR #437: URL: https://github.com/apache/skywalking-banyandb/pull/437#discussion_r1578045805 ## docs/concept/tsdb.md: ## @@ -33,7 +33,9 @@ Notably, for data of the `Stream` type, since there are no field columns, the `f ## Block -The diagram below shows the detailed fields within each block. The block is the minimal unit of tsdb, which contains several rows of data. Due to the column-based design, each block is spread over several files. +Each block holds data with the same series ID. +The max size of the measure block is controlled by data volume and the number of rows. Meanwhile, the max size of the stream block is controlled by data volume. Review Comment: No, I do not want to expose it to end users who do not have experience configuring it. However, dedicated users or contributors can access it by reading the code. -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(skywalking-banyandb) branch stream-load updated (157cc9d3 -> 14a64027)
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a change to branch stream-load in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git from 157cc9d3 Remove empty shards add 14a64027 Add entity value back to element before sorting No new revisions were added by this update. Summary of changes: banyand/stream/iter.go | 37 +++-- banyand/stream/iter_builder.go | 7 +-- banyand/stream/part.go | 1 + banyand/stream/query.go| 25 ++--- 4 files changed, 43 insertions(+), 27 deletions(-)
Re: [PR] Add document for column-based storage [skywalking-banyandb]
Superskyyy commented on PR #435: URL: https://github.com/apache/skywalking-banyandb/pull/435#issuecomment-2074923563 The images are kind of coupled with the website, if someone can't really access website url in their offline local doc the images are not loadable right? -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Add document for column-based storage [skywalking-banyandb]
wu-sheng merged PR #435: URL: https://github.com/apache/skywalking-banyandb/pull/435 -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(skywalking-banyandb) branch main updated: Add document for column-based storage (#435)
This is an automated email from the ASF dual-hosted git repository. wusheng pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git The following commit(s) were added to refs/heads/main by this push: new b8bcf96d Add document for column-based storage (#435) b8bcf96d is described below commit b8bcf96d38b68068b014a894ecf68f22e046820e Author: Huang Youliang <52878305+butterbri...@users.noreply.github.com> AuthorDate: Wed Apr 24 06:22:41 2024 -0700 Add document for column-based storage (#435) --- CONTRIBUTING.md | 2 +- docs/concept/tsdb.md | 51 ++- docs/installation.md | 2 +- docs/installation/binaries.md | 2 +- 4 files changed, 39 insertions(+), 18 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fcae5d0b..026ebc2a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,7 +49,7 @@ Users who want to build a binary from sources have to set up: ### Windows -BanyanDB is built on Linux and macOS that introduced several platform-specific characters to the building system. Therefore, we highly recommend you use [WSL2+Ubuntu](https://ubuntu.com/wsl) to execute tasks of the Makefile. +BanyanDB is built on Linux and macOS that introduced several platform-specific characters to the building system. Therefore, we highly recommend you use [WSL2+Ubuntu](https://ubuntu.com/desktop/wsl) to execute tasks of the Makefile. End of line sequence diff --git a/docs/concept/tsdb.md b/docs/concept/tsdb.md index c1422ece..331afa4a 100644 --- a/docs/concept/tsdb.md +++ b/docs/concept/tsdb.md @@ -2,37 +2,58 @@ TSDB is a time-series storage engine designed to store and query large volumes of time-series data. One of the key features of TSDB is its ability to automatically manage data storage over time, optimize performance and ensure that the system can scale to handle large workloads. TSDB empowers `Measure` and `Stream` relevant data. - ## Shard In TSDB, the data in a group is partitioned into shards based on a configurable sharding scheme. Each shard is assigned to a specific set of storage nodes, and those nodes store and process the data within that shard. This allows BanyanDB to scale horizontally by adding more storage nodes to the cluster as needed. +Within each shard, data is stored in different [segments](#Segment) based on time ranges. The series indexes are generated based on entities, and the indexes generated based on indexing rules of the `Measure` types are also stored under the shard. + +![shard](https://skywalking.apache.org/doc-graph/banyandb/v0.6.0/shard.png) + +## Segment + +Each segment is composed of multiple [parts](#Part). Whenever SkyWalking sends a batch of data, BanyanDB writes this batch of data into a new part. For data of the `Stream` type, the inverted indexes generated based on the indexing rules are also stored in the segment. Since BanyanDB adopts a snapshot approach for data read and write operations, the segment also needs to maintain additional snapshot information to record the validity of the parts. + +![segment](https://skywalking.apache.org/doc-graph/banyandb/v0.6.0/segment.png) + +## Part + +Within a part, data is split into multiple files in a columnar manner. The timestamps are stored in the `timestamps.bin` file, tags are organized in persistent tag families as various files with the `.tf` suffix, and fields are stored separately in the `fields.bin` file. -[shard](https://skywalking.apache.org/doc-graph/banyandb/v0.4.0/tsdb-shard.png) +In addition, each part maintains several metadata files. Among them, `metadata.json` is the metadata file for the part, storing descriptive information, such as start and end times, part size, etc. -* Buffer: It is typically implemented as an in-memory queue managed by a shard. When new time-series data is ingested into the system, it is added to the end of the queue, and when the buffer reaches a specific size, the data is flushed to disk in batches. -* SST: When a bucket of buffer becomes full or reaches a certain size threshold, it is flushed to disk as a new Sorted String Table (SST) file. This process is known as compaction. -* Segments and Blocks: Time-series data is stored in data segments/blocks within each shard. Blocks contain a fixed number of data points and are organized into time windows. Each data segment includes an index that efficiently retrieves data within the block. -* Block Cache: It manages the in-memory cache of data blocks, improving query performance by caching frequently accessed data blocks in memory. +The `meta.bin` is a skipping index file serves as the entry file for the entire part, helping to index the `primary.bin` file. + +The `primary.bin` file contains the index of each [block](#Block). Through it, the actual data files or the tagFamily metadata files ending with `.tfm` can be indexed, which in
[I] [BanyanDB-Server] Improve sorting and filtering performance of Stream [skywalking]
hanahmily opened a new issue, #12160: URL: https://github.com/apache/skywalking/issues/12160 ### Search before asking - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar feature requirement. ### Description The current filtering and sorting operations scan through all parts to locate a single record in a loop. As the number of parts increases, this method can cause delays and slow down the scanning process. To resolve this issue, the operations should refer to the standard query, which leverages the tsTableIterator to scan parts only once. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a pull request to implement this on your own? - [ ] Yes I am willing to submit a pull request on my own! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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: notifications-unsubscr...@skywalking.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Fix flaws found by stream load test [skywalking-banyandb]
wu-sheng merged PR #436: URL: https://github.com/apache/skywalking-banyandb/pull/436 -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(skywalking-banyandb) branch main updated: Fix flaws found by stream load test (#436)
This is an automated email from the ASF dual-hosted git repository. wusheng pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git The following commit(s) were added to refs/heads/main by this push: new 16568aa8 Fix flaws found by stream load test (#436) 16568aa8 is described below commit 16568aa88e48492a52d578b7b594e844f99c7b2b Author: Gao Hongtao AuthorDate: Wed Apr 24 18:03:24 2024 +0800 Fix flaws found by stream load test (#436) --- banyand/internal/storage/index.go | 17 +- banyand/internal/storage/retention.go | 10 +- banyand/internal/storage/segment.go | 6 +- banyand/internal/storage/tsdb.go | 94 +++ banyand/liaison/grpc/measure.go | 2 +- banyand/liaison/grpc/stream.go| 3 +- banyand/measure/measure.go| 4 +- banyand/measure/write.go | 92 -- banyand/stream/index.go | 19 +-- banyand/stream/iter.go| 160 +++--- banyand/stream/iter_builder.go| 136 --- banyand/stream/part.go| 82 - banyand/stream/query.go | 45 ++--- banyand/stream/stream.go | 6 +- banyand/stream/tstable.go | 3 +- banyand/stream/write.go | 125 +++--- pkg/index/index.go| 14 +- pkg/index/inverted/inverted.go| 235 +- pkg/index/inverted/inverted_test.go | 20 +-- pkg/index/inverted/sort.go| 82 ++--- pkg/index/inverted/sort_test.go | 226 + pkg/index/testcases/duration.go | 41 + pkg/index/testcases/service_name.go | 1 + pkg/partition/index.go| 37 ++-- pkg/pb/v1/series.go | 9 + pkg/test/query/metric.go | 193 + pkg/test/query/trace.go | 6 +- pkg/timestamp/range.go| 4 +- test/cases/stream/data/input/sort_filter.yaml | 36 test/cases/stream/data/want/sort_filter.yaml | 69 test/cases/stream/stream.go | 1 + test/docker/base-compose.yml | 12 +- test/stress/trace/Makefile| 10 +- test/stress/trace/docker-compose-cluster.yaml | 36 +++- test/stress/trace/docker-compose-single.yaml | 2 +- test/stress/trace/trace_suite_test.go | 22 ++- 36 files changed, 1193 insertions(+), 667 deletions(-) diff --git a/banyand/internal/storage/index.go b/banyand/internal/storage/index.go index af7eaed4..575ec706 100644 --- a/banyand/internal/storage/index.go +++ b/banyand/internal/storage/index.go @@ -198,14 +198,11 @@ func (s *seriesIndex) Search(ctx context.Context, series *pbv1.Series, filter in var sortedSeriesList pbv1.SeriesList for iter.Next() { - pv := iter.Val().Value - if err = pv.Intersect(pl); err != nil { - return nil, err - } - if pv.IsEmpty() { + seriesID, _ := iter.Val() + if !pl.Contains(seriesID) { continue } - sortedSeriesList = appendSeriesList(sortedSeriesList, seriesList, pv) + sortedSeriesList = appendSeriesList(sortedSeriesList, seriesList, common.SeriesID(seriesID)) if err != nil { return nil, err } @@ -223,12 +220,12 @@ func filterSeriesList(seriesList pbv1.SeriesList, filter posting.List) pbv1.Seri return seriesList } -func appendSeriesList(dest, src pbv1.SeriesList, filter posting.List) pbv1.SeriesList { +func appendSeriesList(dest, src pbv1.SeriesList, target common.SeriesID) pbv1.SeriesList { for i := 0; i < len(src); i++ { - if !filter.Contains(uint64(src[i].ID)) { - continue + if target == src[i].ID { + dest = append(dest, src[i]) + break } - dest = append(dest, src[i]) } return dest } diff --git a/banyand/internal/storage/retention.go b/banyand/internal/storage/retention.go index 445b7f56..87e25ff0 100644 --- a/banyand/internal/storage/retention.go +++ b/banyand/internal/storage/retention.go @@ -51,13 +51,13 @@ func newRetentionTask[T TSTable, O any](database *database[T, O], ttl IntervalRu } func (rc *retentionTask[T, O]) run(now time.Time, l *logger.Logger) bool { - var shardList []*shard[T, O] - rc.database.RLock() - shardList = append(shardList, rc.database.sLst...) - rc.database.RUnlock() + shardList := rc.database.sLst.Load() + if
Re: [PR] Polish block docs [skywalking-banyandb]
Superskyyy commented on code in PR #437: URL: https://github.com/apache/skywalking-banyandb/pull/437#discussion_r1578010497 ## docs/concept/tsdb.md: ## @@ -33,7 +33,9 @@ Notably, for data of the `Stream` type, since there are no field columns, the `f ## Block -The diagram below shows the detailed fields within each block. The block is the minimal unit of tsdb, which contains several rows of data. Due to the column-based design, each block is spread over several files. +Each block holds data with the same series ID. +The max size of the measure block is controlled by data volume and the number of rows. Meanwhile, the max size of the stream block is controlled by data volume. Review Comment: Just curious is the data volume and number of rows adjustable through config? -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Polish block docs [skywalking-banyandb]
wu-sheng commented on code in PR #437: URL: https://github.com/apache/skywalking-banyandb/pull/437#discussion_r1578011828 ## docs/concept/tsdb.md: ## @@ -33,7 +33,9 @@ Notably, for data of the `Stream` type, since there are no field columns, the `f ## Block -The diagram below shows the detailed fields within each block. The block is the minimal unit of tsdb, which contains several rows of data. Due to the column-based design, each block is spread over several files. +Each block holds data with the same series ID. +The max size of the measure block is controlled by data volume and the number of rows. Meanwhile, the max size of the stream block is controlled by data volume. Review Comment: I think they are not able to do for now. -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(skywalking-banyandb) branch stream-load deleted (was 14a64027)
This is an automated email from the ASF dual-hosted git repository. wusheng pushed a change to branch stream-load in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git was 14a64027 Add entity value back to element before sorting The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
Re: [PR] Polish block docs [skywalking-banyandb]
Superskyyy commented on code in PR #437: URL: https://github.com/apache/skywalking-banyandb/pull/437#discussion_r1578016320 ## docs/concept/tsdb.md: ## @@ -33,7 +33,9 @@ Notably, for data of the `Stream` type, since there are no field columns, the `f ## Block -The diagram below shows the detailed fields within each block. The block is the minimal unit of tsdb, which contains several rows of data. Due to the column-based design, each block is spread over several files. +Each block holds data with the same series ID. +The max size of the measure block is controlled by data volume and the number of rows. Meanwhile, the max size of the stream block is controlled by data volume. Review Comment: I see. Thanks for explaining. -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Polish block docs [skywalking-banyandb]
hanahmily merged PR #437: URL: https://github.com/apache/skywalking-banyandb/pull/437 -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Add doc for EventExporter [skywalking-swck]
dashanji commented on PR #116: URL: https://github.com/apache/skywalking-swck/pull/116#issuecomment-2075265191 > @dashanji How is the e2e here? I'm not sure if recent e2e tests were caused by k8s or skywalking components. Maybe need a further exploration. -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(skywalking-banyandb) branch wu-sheng-patch-1 deleted (was faaef477)
This is an automated email from the ASF dual-hosted git repository. wusheng pushed a change to branch wu-sheng-patch-1 in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git was faaef477 Update tsdb.md The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
Re: [PR] Add doc for EventExporter [skywalking-swck]
wu-sheng commented on PR #116: URL: https://github.com/apache/skywalking-swck/pull/116#issuecomment-2075276339 Let's fix the SWCK in helm first. Then we could address this. -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Add doc for EventExporter [skywalking-swck]
dashanji commented on PR #116: URL: https://github.com/apache/skywalking-swck/pull/116#issuecomment-2075285496 > Let's fix the SWCK in helm first. Then we could address this. Okay. -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] Fix a spelling mistake about 'kubectl' [skywalking-rover]
IluckySi opened a new pull request, #124: URL: https://github.com/apache/skywalking-rover/pull/124 Fix a spelling mistake about 'kubectl' -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Fix a spelling mistake about 'kubectl' [skywalking-rover]
IluckySi merged PR #124: URL: https://github.com/apache/skywalking-rover/pull/124 -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(skywalking-banyandb) branch api-multi-groups created (now 7a738c5d)
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a change to branch api-multi-groups in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git at 7a738c5d Support querying multi-groups in a single request This branch includes the following new commits: new 7a738c5d Support querying multi-groups in a single request 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.
(skywalking-banyandb) 01/01: Support querying multi-groups in a single request
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch api-multi-groups in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git commit 7a738c5dfb264f4284a5928489e98a6997b557d7 Author: Gao Hongtao AuthorDate: Thu Apr 25 13:42:36 2024 +0800 Support querying multi-groups in a single request Signed-off-by: Gao Hongtao --- api/proto/banyandb/measure/v1/query.proto | 9 +- api/proto/banyandb/measure/v1/rpc.proto| 6 +- api/proto/banyandb/measure/v1/topn.proto | 17 +-- api/proto/banyandb/stream/v1/query.proto | 19 ++-- api/proto/banyandb/stream/v1/rpc.proto | 4 +- banyand/dquery/measure.go | 13 ++- banyand/dquery/stream.go | 12 ++- banyand/dquery/topn.go | 4 +- banyand/internal/storage/index.go | 2 +- banyand/internal/storage/index_test.go | 120 - banyand/measure/query.go | 4 +- banyand/query/processor.go | 24 - banyand/query/processor_topn.go| 13 ++- banyand/stream/query.go| 8 +- bydbctl/internal/cmd/group.go | 2 +- bydbctl/internal/cmd/measure_test.go | 10 +- bydbctl/internal/cmd/rest.go | 43 +--- bydbctl/internal/cmd/stream_test.go| 10 +- docs/api-reference.md | 9 +- .../logical/measure/measure_plan_distributed.go| 3 +- .../logical/stream/stream_plan_distributed.go | 3 +- scripts/build/version.mk | 8 +- test/cases/measure/data/input/all.yaml | 5 +- test/cases/measure/data/input/all_latency.yaml | 5 +- test/cases/measure/data/input/all_only_fields.yaml | 5 +- test/cases/measure/data/input/bottom.yaml | 5 +- test/cases/measure/data/input/entity.yaml | 5 +- test/cases/measure/data/input/entity_in.yaml | 5 +- test/cases/measure/data/input/entity_service.yaml | 5 +- test/cases/measure/data/input/err_invalid_le.yaml | 5 +- test/cases/measure/data/input/float.yaml | 5 +- test/cases/measure/data/input/float_agg_min.yaml | 7 +- test/cases/measure/data/input/group_max.yaml | 5 +- test/cases/measure/data/input/group_no_field.yaml | 5 +- test/cases/measure/data/input/in.yaml | 5 +- test/cases/measure/data/input/limit.yaml | 5 +- test/cases/measure/data/input/linked_or.yaml | 5 +- test/cases/measure/data/input/match_node.yaml | 5 +- test/cases/measure/data/input/match_nodes.yaml | 5 +- test/cases/measure/data/input/no_field.yaml| 5 +- test/cases/measure/data/input/order_asc.yaml | 5 +- test/cases/measure/data/input/order_desc.yaml | 5 +- test/cases/measure/data/input/order_tag_asc.yaml | 5 +- test/cases/measure/data/input/order_tag_desc.yaml | 5 +- test/cases/measure/data/input/tag_filter.yaml | 5 +- test/cases/measure/data/input/tag_filter_int.yaml | 5 +- .../measure/data/input/tag_filter_unknown.yaml | 5 +- test/cases/measure/data/input/top.yaml | 5 +- test/cases/stream/data/input/all.yaml | 7 +- test/cases/stream/data/input/filter_tag.yaml | 5 +- test/cases/stream/data/input/filter_tag_empty.yaml | 5 +- test/cases/stream/data/input/global_index.yaml | 5 +- test/cases/stream/data/input/global_indices.yaml | 5 +- test/cases/stream/data/input/having.yaml | 7 +- .../stream/data/input/having_non_indexed.yaml | 7 +- .../stream/data/input/having_non_indexed_arr.yaml | 7 +- test/cases/stream/data/input/indexed_only.yaml | 7 +- test/cases/stream/data/input/less.yaml | 7 +- test/cases/stream/data/input/less_eq.yaml | 7 +- test/cases/stream/data/input/limit.yaml| 7 +- test/cases/stream/data/input/logical.yaml | 5 +- test/cases/stream/data/input/offset.yaml | 7 +- test/cases/stream/data/input/search.yaml | 7 +- test/cases/stream/data/input/sort_desc.yaml| 7 +- test/cases/stream/data/input/sort_filter.yaml | 7 +- test/cases/topn/data/input/aggr_desc.yaml | 5 +- .../cases/topn/data/input/condition_aggr_desc.yaml | 5 +- test/cases/topn/data/input/null_group.yaml | 5 +- test/integration/load/load_suite_test.go | 7 +- ui/src/components/Read/index.vue | 12 +-- 70 files changed, 344 insertions(+), 274 deletions(-) diff --git a/api/proto/banyandb/measure/v1/query.proto b/api/proto/banyandb/measure/v1/query.proto index 8350ba86..9e07aea6 100644 --- a/api/proto/banyandb/measure/v1/query.proto +++ b/api/proto/banyandb/measure/v1/query.proto @@
[PR] Bump pydantic from 1.10.12 to 1.10.13 [skywalking-python]
dependabot[bot] opened a new pull request, #340: URL: https://github.com/apache/skywalking-python/pull/340 Bumps [pydantic](https://github.com/pydantic/pydantic) from 1.10.12 to 1.10.13. Release notes Sourced from https://github.com/pydantic/pydantic/releases;>pydantic's releases. V1.10.13 2023-09-27 What's Changed Update pip commands to install 1.10 by https://github.com/chbndrhnns;>@chbndrhnns in https://redirect.github.com/pydantic/pydantic/pull/6930;>pydantic/pydantic#6930 Make the v1 mypy plugin work with both v1 and v2 by https://github.com/dmontagu;>@dmontagu in https://redirect.github.com/pydantic/pydantic/pull/6920;>pydantic/pydantic#6920 [Backport] Add max length check to validate_email by https://github.com/hramezani;>@hramezani in https://redirect.github.com/pydantic/pydantic/pull/7673;>pydantic/pydantic#7673 Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.12...v1.10.13;>https://github.com/pydantic/pydantic/compare/v1.10.12...v1.10.13 Changelog Sourced from https://github.com/pydantic/pydantic/blob/main/HISTORY.md;>pydantic's changelog. v1.10.13 (2023-09-27) Fix: Add max length check to pydantic.validate_email, https://redirect.github.com/pydantic/pydantic/issues/7673;>#7673 by https://github.com/hramezani;>@hramezani Docs: Fix pip commands to install v1, https://redirect.github.com/pydantic/pydantic/issues/6930;>#6930 by https://github.com/chbndrhnns;>@chbndrhnns Commits https://github.com/pydantic/pydantic/commit/8822578619bf8d0bb754b1cf7a2a905b50240d01;>8822578 Prepare release 1.10.13 (https://redirect.github.com/pydantic/pydantic/issues/7674;>#7674) https://github.com/pydantic/pydantic/commit/59d8f38fd6220e3917c53785dbc70317d6f8e631;>59d8f38 [Backport] Add max length check to validate_email (https://redirect.github.com/pydantic/pydantic/issues/7673;>#7673) https://github.com/pydantic/pydantic/commit/69b92b547f7f268f7914d3346b57c59a0d550e42;>69b92b5 Make the v1 mypy plugin work with both v1 and v2 (https://redirect.github.com/pydantic/pydantic/issues/6920;>#6920) https://github.com/pydantic/pydantic/commit/87bf41755fe59082abf8352a2cf8c2889ee0849f;>87bf417 Update pip commands to install 1.10 (https://redirect.github.com/pydantic/pydantic/issues/6930;>#6930) See full diff in https://github.com/pydantic/pydantic/compare/v1.10.12...v1.10.13;>compare view [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pydantic=pip=1.10.12=1.10.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/apache/skywalking-python/network/alerts). -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(skywalking-banyandb-java-client) branch multi-groups created (now 153c2f4)
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a change to branch multi-groups in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb-java-client.git at 153c2f4 Bump proto to support multi-groups in query This branch includes the following new commits: new 153c2f4 Bump proto to support multi-groups in query 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.
(skywalking-banyandb-java-client) 01/01: Bump proto to support multi-groups in query
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch multi-groups in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb-java-client.git commit 153c2f4f549c9f24ac45e86ea3f888ae101aff87 Author: Gao Hongtao AuthorDate: Thu Apr 25 13:39:02 2024 +0800 Bump proto to support multi-groups in query Signed-off-by: Gao Hongtao --- .../banyandb/v1/client/AbstractQuery.java | 14 ++--- .../banyandb/v1/client/BanyanDBClient.java | 36 ++ .../banyandb/v1/client/MeasureQuery.java | 12 +--- .../skywalking/banyandb/v1/client/StreamQuery.java | 14 + .../skywalking/banyandb/v1/client/TopNQuery.java | 10 +++--- src/main/proto/banyandb/v1/banyandb-measure.proto | 27 +--- src/main/proto/banyandb/v1/banyandb-stream.proto | 18 ++- .../v1/client/BanyanDBClientMeasureQueryTest.java | 6 ++-- .../v1/client/BanyanDBClientStreamQueryTest.java | 18 +-- .../v1/client/ITBanyanDBMeasureQueryTests.java | 3 +- .../v1/client/ITBanyanDBStreamQueryTests.java | 3 +- 11 files changed, 89 insertions(+), 72 deletions(-) diff --git a/src/main/java/org/apache/skywalking/banyandb/v1/client/AbstractQuery.java b/src/main/java/org/apache/skywalking/banyandb/v1/client/AbstractQuery.java index d2788c4..ed05aa1 100644 --- a/src/main/java/org/apache/skywalking/banyandb/v1/client/AbstractQuery.java +++ b/src/main/java/org/apache/skywalking/banyandb/v1/client/AbstractQuery.java @@ -24,7 +24,6 @@ import com.google.common.collect.ListMultimap; import lombok.AccessLevel; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.skywalking.banyandb.common.v1.BanyandbCommon; import org.apache.skywalking.banyandb.model.v1.BanyandbModel; import org.apache.skywalking.banyandb.v1.client.grpc.exception.BanyanDBException; import org.apache.skywalking.banyandb.v1.client.grpc.exception.InvalidReferenceException; @@ -39,7 +38,7 @@ public abstract class AbstractQuery { /** * Group of the current entity */ -protected final String group; +protected final List groups; /** * Owner name of the current entity */ @@ -63,8 +62,8 @@ public abstract class AbstractQuery { */ protected AbstractCriteria criteria; -public AbstractQuery(String group, String name, TimestampRange timestampRange, Set tagProjections) { -this.group = group; +public AbstractQuery(List groups, String name, TimestampRange timestampRange, Set tagProjections) { +this.groups = groups; this.name = name; this.timestampRange = timestampRange; this.conditions = new ArrayList<>(10); @@ -107,13 +106,6 @@ public abstract class AbstractQuery { */ abstract T build(MetadataCache.EntityMetadata entityMetadata) throws BanyanDBException; -protected BanyandbCommon.Metadata buildMetadata() { -return BanyandbCommon.Metadata.newBuilder() -.setGroup(group) -.setName(name) -.build(); -} - protected Optional buildCriteria() { if (criteria != null) { return Optional.of(criteria.build()); diff --git a/src/main/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClient.java b/src/main/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClient.java index c1d4e3f..2ec4d65 100644 --- a/src/main/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClient.java +++ b/src/main/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClient.java @@ -348,11 +348,18 @@ public class BanyanDBClient implements Closeable { public StreamQueryResponse query(StreamQuery streamQuery) throws BanyanDBException { checkState(this.streamServiceStub != null, "stream service is null"); -final BanyandbStream.QueryResponse response = HandleExceptionsWith.callAndTranslateApiException(() -> -this.streamServiceBlockingStub -.withDeadlineAfter(this.getOptions().getDeadline(), TimeUnit.SECONDS) - .query(streamQuery.build(this.metadataCache.findMetadata(streamQuery.group, streamQuery.name; -return new StreamQueryResponse(response); +for (String group : streamQuery.groups) { +MetadataCache.EntityMetadata em = this.metadataCache.findMetadata(group, streamQuery.name); +if (em != null) { +final BanyandbStream.QueryResponse response = HandleExceptionsWith.callAndTranslateApiException(() -> +this.streamServiceBlockingStub + .withDeadlineAfter(this.getOptions().getDeadline(), TimeUnit.SECONDS) +.query(streamQuery.build(em))); +return new StreamQueryResponse(response); +} + +} +throw new RuntimeException("No metadata found for the query"); }
(skywalking) branch bump-banyandb-api updated (cec72540e7 -> ad80d9cca7)
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a change to branch bump-banyandb-api in repository https://gitbox.apache.org/repos/asf/skywalking.git from cec72540e7 Bump banyandb api new d7c47357fd Update banyandb api add 8dd842189d Fix missing dashboard settings (#12078) add c79423c358 Bump up dependencies to fix CVEs (#12080) add bbbed44863 [Break Change]: Labeled Metrics support multiple labels. (#12082) add f5cd798185 Fix `NullPointerException` in Istio ServiceEntry registry (#12087) add 8699ffdf28 Bump up kafka client to fix CVE (#12088) add 5a90121c82 Sync UI (#12089) add f97fd4f6e4 Remove unnecessary `componentIds` as series ID (#12091) add 13bb3f62a6 Fix not throw error when part of expression not matched any expression node in the `MQE` and `PromQL. (#12093) add 7701e425d6 Remove `kafka-fetcher/default/createTopicIfNotExist` (#12095) add 7a6a19db7f Aggregate nginx service metrics by using `multiple labels` feature & Remove unused type label in latency metrics. (#12096) add ee01ce878b chore: update comment of MySQLTableInstaller (#12099) add a8b0d18943 Remove group and support labels in the meter histogram-percentile function. (#12101) add c551a9ddb6 sync ui (#12102) add d8921d5256 Rename Windows Metrics(swap -> virtual memory) (#12107) add 65a5b4484c Format service-hierarchy.md (#12110) add 0b9bbb47b3 Clean the unused elements in the UI-templates. (#12111) add bf19d641e4 sync ui (#12113) add bea7ed3f4a Fix inaccurate APISIX metrics (#12108) add a9e27f651d Explicit globstar is now required to match (#12119) add 630d54d963 Fix hierarchy matching rule and add hierarchy env config and sync UI (#12120) add d71f858f2f Fix inaccurate MongoDB Metrics & Add label for complex MQE in Nginx dashboard. (#12126) add 7e978261fc Add ActiveMQ classic monitoring (#12109) add d6fc848e8b Calculate Nginx service HTTP Latency by MQE. (#12136) add 5808627227 * MQE query: make metadata not return `null`. (#12142) add e9a2ed2c03 fix inaccurate Hierarchy of RabbitMQ metrics. (#12144) add 86155bef81 Fix inaccurate MySQL/MariaDB, Redis metrics (#12130) add 2d6bc69adb Optimize OTEL metrics attributes KV convert. (#12152) add fe2c4b5f3f [Break Change] gGRPC metrics exporter unified the metric value type and support labeled metrics. (#12156) new ad80d9cca7 Merge remote-tracking branch 'origin/master' into bump-banyandb-api The 2 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: .github/workflows/skywalking.yaml |6 +- .licenserc.yaml|9 +- dist-material/alarm-settings.yml |2 +- dist-material/release-docs/LICENSE | 115 +- docs/en/api/metrics-query-expression.md| 84 +- docs/en/api/promql-service.md | 32 +- docs/en/changes/changes.md | 44 + docs/en/concepts-and-designs/oal.md|7 +- .../service-hierarchy-configuration.md |4 +- docs/en/concepts-and-designs/service-hierarchy.md | 195 +- .../setup/backend/backend-activemq-monitoring.md | 107 + docs/en/setup/backend/backend-alarm.md |4 +- .../en/setup/backend/backend-mongodb-monitoring.md | 34 +- docs/en/setup/backend/backend-mysql-monitoring.md | 24 +- docs/en/setup/backend/backend-redis-monitoring.md | 24 +- docs/en/setup/backend/configuration-vocabulary.md |4 +- docs/en/setup/backend/exporter.md |2 +- docs/en/setup/backend/opentelemetry-receiver.md|2 + docs/en/swip/SWIP-8.md | 100 + docs/en/swip/readme.md |3 +- docs/menu.yml |2 + oap-server-bom/pom.xml | 14 +- .../skywalking/oap/meter/analyzer/Analyzer.java| 24 +- .../oap/meter/analyzer/dsl/AnalyzerTest.java | 38 +- .../provider/grpc/GRPCMetricsExporter.java | 191 +- .../exporter/src/main/proto/metric-exporter.proto | 26 +- .../exporter/provider/grpc/GRPCExporterTest.java | 67 +- ...ueMetrics.java => MockLabeledValueMetrics.java} | 14 +- .../provider/grpc/MockMetricExportServiceImpl.java | 41 +- .../server/exporter/provider/grpc/MockMetrics.java |2 +- .../apache/skywalking/mqe/rt/grammar/MQEParser.g4 | 20 +- .../apache/skywalking/mqe/rt/MQEVisitorBase.java | 96 +- .../mqe/rt/operation/AggregateLabelsOp.java| 81 +- .../apache/skywalking/mqe/rt/operation/LROp.java | 60 +- .../mqe/rt/operation/LogicalFunctionOp.java|2 -
(skywalking) 02/02: Merge remote-tracking branch 'origin/master' into bump-banyandb-api
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch bump-banyandb-api in repository https://gitbox.apache.org/repos/asf/skywalking.git commit ad80d9cca7a862b719f7dd8229cb9bfe01b77c3c Merge: d7c47357fd fe2c4b5f3f Author: Gao Hongtao AuthorDate: Thu Apr 25 13:15:01 2024 +0800 Merge remote-tracking branch 'origin/master' into bump-banyandb-api .github/workflows/skywalking.yaml |6 +- .licenserc.yaml|9 +- dist-material/alarm-settings.yml |2 +- dist-material/release-docs/LICENSE | 115 +- docs/en/api/metrics-query-expression.md| 84 +- docs/en/api/promql-service.md | 32 +- docs/en/changes/changes.md | 44 + docs/en/concepts-and-designs/oal.md|7 +- .../service-hierarchy-configuration.md |4 +- docs/en/concepts-and-designs/service-hierarchy.md | 195 +- .../setup/backend/backend-activemq-monitoring.md | 107 + docs/en/setup/backend/backend-alarm.md |4 +- .../en/setup/backend/backend-mongodb-monitoring.md | 34 +- docs/en/setup/backend/backend-mysql-monitoring.md | 24 +- docs/en/setup/backend/backend-redis-monitoring.md | 24 +- docs/en/setup/backend/configuration-vocabulary.md |4 +- docs/en/setup/backend/exporter.md |2 +- docs/en/setup/backend/opentelemetry-receiver.md|2 + docs/en/swip/SWIP-8.md | 100 + docs/en/swip/readme.md |3 +- docs/menu.yml |2 + oap-server-bom/pom.xml | 14 +- .../skywalking/oap/meter/analyzer/Analyzer.java| 24 +- .../oap/meter/analyzer/dsl/AnalyzerTest.java | 38 +- .../provider/grpc/GRPCMetricsExporter.java | 191 +- .../exporter/src/main/proto/metric-exporter.proto | 26 +- .../exporter/provider/grpc/GRPCExporterTest.java | 67 +- ...ueMetrics.java => MockLabeledValueMetrics.java} | 14 +- .../provider/grpc/MockMetricExportServiceImpl.java | 41 +- .../server/exporter/provider/grpc/MockMetrics.java |2 +- .../apache/skywalking/mqe/rt/grammar/MQEParser.g4 | 20 +- .../apache/skywalking/mqe/rt/MQEVisitorBase.java | 96 +- .../mqe/rt/operation/AggregateLabelsOp.java| 81 +- .../apache/skywalking/mqe/rt/operation/LROp.java | 60 +- .../mqe/rt/operation/LogicalFunctionOp.java|2 - .../apache/skywalking/mqe/rt/type/MQEValues.java |2 +- .../apache/skywalking/mqe/rt/type/Metadata.java|5 + .../skywalking/mqe/rt/AggregateLabelsOpTest.java | 69 +- .../skywalking/mqe/rt/AggregationOpTest.java | 48 +- .../org/apache/skywalking/mqe/rt/BinaryOpTest.java | 46 +- .../apache/skywalking/mqe/rt/CompareOPTest.java| 48 +- .../mqe/rt/MathematicalFunctionOpTest.java |7 +- .../org/apache/skywalking/mqe/rt/MockData.java |6 + .../server/core/alarm/provider/RunningRule.java| 13 +- .../provider/expr/rt/AlarmMQEVerifyVisitor.java| 39 +- .../alarm/provider/expr/rt/AlarmMQEVisitor.java| 82 +- .../core/alarm/provider/RunningRuleTest.java | 102 +- .../apache/skywalking/oap/server/core/Const.java |3 + .../skywalking/oap/server/core/analysis/Layer.java |7 +- .../service/ServiceRelationClientSideMetrics.java |1 - .../service/ServiceRelationServerSideMetrics.java |1 - .../analysis/meter/function/BucketedValues.java|6 +- .../meter/function/PercentileFunction.java | 317 --- .../avg/AvgHistogramPercentileFunction.java| 38 +- .../sum/SumHistogramPercentileFunction.java| 38 +- .../server/core/analysis/metrics/DataLabel.java| 92 + .../server/core/analysis/metrics/DataTable.java| 37 +- .../oap/server/core/analysis/metrics/Metrics.java | 10 +- .../analysis/metrics/MultiIntValuesHolder.java |2 + .../core/analysis/metrics/PercentileMetrics.java |6 +- ...centileMetrics.java => PercentileMetrics2.java} | 41 +- .../ui/template/UITemplateInitializer.java |1 + .../server/core/query/AggregationQueryService.java |4 + .../oap/server/core/query/MetricsQueryService.java | 24 +- .../oap/server/core/query/RecordQueryService.java |4 + .../oap/server/core/storage/annotation/Column.java |8 + .../storage/annotation/ValueColumnMetadata.java| 14 +- .../server/core/storage/model/StorageModels.java |3 +- .../core/storage/query/IMetricsQueryDAO.java | 169 +- .../meter/function/PercentileFunctionTest.java | 233 -- .../function/avg/AvgHistogramFunctionTest.java |3 - .../avg/AvgHistogramPercentileFunctionTest.java| 30 +- .../sum/SumHistogramPercentileFunctionTest.java| 32 +- .../core/storage/query/MetricsQueryUtilTest.java | 54 +-
(skywalking) 01/02: Update banyandb api
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch bump-banyandb-api in repository https://gitbox.apache.org/repos/asf/skywalking.git commit d7c47357fd40f7d37d25e9e6a87d5687b25c0c57 Author: Gao Hongtao AuthorDate: Thu Apr 25 13:11:23 2024 +0800 Update banyandb api Signed-off-by: Gao Hongtao --- .../storage/plugin/banyandb/stream/AbstractBanyanDBDAO.java| 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/stream/AbstractBanyanDBDAO.java b/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/stream/AbstractBanyanDBDAO.java index 2f66ee5069..250037bb38 100644 --- a/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/stream/AbstractBanyanDBDAO.java +++ b/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/stream/AbstractBanyanDBDAO.java @@ -65,9 +65,9 @@ public abstract class AbstractBanyanDBDAO extends AbstractDAO additionalConditions) throws IOException { -final TopNQuery q = new TopNQuery(schema.getMetadata().getGroup(), schema.getTopNSpec().getName(), +final TopNQuery q = new TopNQuery(List.of(schema.getMetadata().getGroup()), schema.getTopNSpec().getName(), timestampRange, number, sort); q.setAggregationType(MeasureQuery.Aggregation.Type.MEAN); @@ -119,9 +119,9 @@ public abstract class AbstractBanyanDBDAO extends AbstractDAO builder) throws IOException { final MeasureQuery query; if (timestampRange == null) { -query = new MeasureQuery(schema.getMetadata().getGroup(), schema.getMetadata().name(), LARGEST_TIME_RANGE, tags, fields); +query = new MeasureQuery(List.of(schema.getMetadata().getGroup()), schema.getMetadata().name(), LARGEST_TIME_RANGE, tags, fields); } else { -query = new MeasureQuery(schema.getMetadata().getGroup(), schema.getMetadata().name(), timestampRange, tags, fields); +query = new MeasureQuery(List.of(schema.getMetadata().getGroup()), schema.getMetadata().name(), timestampRange, tags, fields); } builder.apply(query);
(skywalking-python) branch dependabot/pip/pydantic-1.10.13 created (now 12d20d4)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/pip/pydantic-1.10.13 in repository https://gitbox.apache.org/repos/asf/skywalking-python.git at 12d20d4 Bump pydantic from 1.10.12 to 1.10.13 No new revisions were added by this update.
(skywalking-python) branch dependabot/pip/pydantic-1.10.13 deleted (was 12d20d4)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/pip/pydantic-1.10.13 in repository https://gitbox.apache.org/repos/asf/skywalking-python.git was 12d20d4 Bump pydantic from 1.10.12 to 1.10.13 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
Re: [PR] Bump pydantic from 1.10.12 to 1.10.13 [skywalking-python]
wu-sheng closed pull request #340: Bump pydantic from 1.10.12 to 1.10.13 URL: https://github.com/apache/skywalking-python/pull/340 -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump pydantic from 1.10.12 to 1.10.13 [skywalking-python]
dependabot[bot] commented on PR #340: URL: https://github.com/apache/skywalking-python/pull/340#issuecomment-2076397528 OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting `@dependabot ignore this major version` or `@dependabot ignore this minor version`. If you change your mind, just re-open this PR and I'll resolve any conflicts on it. -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Fix flaws found by stream load test [skywalking-banyandb]
wu-sheng commented on PR #436: URL: https://github.com/apache/skywalking-banyandb/pull/436#issuecomment-2074399498 e2e fails, please fix it. -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[I] [Bug] [skywalking]
OrezzerO opened a new issue, #12157: URL: https://github.com/apache/skywalking/issues/12157 ### Search before asking - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues. ### Apache SkyWalking Component OAP server (apache/skywalking) ### What happened I try to run oap server in docker with mysql as storage. Here is my docker compose file: ```yml version: '2.1' services: oap: image: apache/skywalking-oap-server:9.6.0-java17 networks: - skywalking environment: SW_OTEL_RECEIVER: default SW_OTEL_RECEIVER_ENABLED_OTEL_METRICS_RULES: vm TZ: Asia/Shanghai SW_STORAGE: mysql SW_JDBC_URL: jdbc:mysql://xxx:3306/sw SW_DATA_SOURCE_USER: SW_DATA_SOURCE_PASSWORD: JAVA_OPTS: -Xms4G -Xmx4G volumes: - ./mysql-connector-j-8.0.32.jar:/skywalking/oap-libs/mysql-connector-j-8.0.32.jar ports: - "1234:1234" - "11800:11800" - "12800:12800" oap-ui: image: apache/skywalking-ui:9.6.0-java17 networks: - skywalking environment: SW_OAP_ADDRESS: http://oap:12800 JAVA_OPTS: -Xms2G -Xmx2G ports: - "8080:8080" networks: skywalking: ``` I create a database `sw` in mysql . When i run `docker compose up` , oap log says `SELECT command denied to user ''@'xxx' for table ''`. Each time when i run `docker compose up` table name changes. I go to mysql and check. table exists. It seems that select command is executed async and before table is created. Now I am running `docker compose up` and `docker compose down` repeatedly. Each round can create one or two new table . ### What you expected to happen 1. Tables can be created once .and i do not need to restart container. ### How to reproduce run my docker compose ### Anything else _No response_ ### Are you willing to submit a pull request to fix on your own? - [ ] Yes I am willing to submit a pull request on my own! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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: notifications-unsubscr...@skywalking.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] [Bug] [skywalking]
wu-sheng closed issue #12157: [Bug] URL: https://github.com/apache/skywalking/issues/12157 -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] [Bug] [skywalking]
wu-sheng commented on issue #12157: URL: https://github.com/apache/skywalking/issues/12157#issuecomment-2074418334 No title, and this should be a discussion. -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] [Bug] [skywalking]
OrezzerO commented on issue #12157: URL: https://github.com/apache/skywalking/issues/12157#issuecomment-2074441206 Move to discussion :https://github.com/apache/skywalking/discussions/12158 -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(skywalking-banyandb) 02/05: Remove term dependencies
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch stream-load in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git commit 78aeb8e165ebcac7ed1bdabfcc16bfc2849977d0 Author: Gao Hongtao AuthorDate: Mon Apr 22 00:50:13 2024 + Remove term dependencies Signed-off-by: Gao Hongtao --- banyand/internal/storage/segment.go | 6 +- banyand/measure/write.go| 4 +- banyand/stream/index.go | 6 +- banyand/stream/iter.go | 106 banyand/stream/iter_builder.go | 85 ++--- banyand/stream/part.go | 14 ++--- banyand/stream/query.go | 9 +-- banyand/stream/tstable.go | 2 +- banyand/stream/write.go | 6 +- pkg/timestamp/range.go | 4 +- 10 files changed, 148 insertions(+), 94 deletions(-) diff --git a/banyand/internal/storage/segment.go b/banyand/internal/storage/segment.go index 2df03813..80dc6485 100644 --- a/banyand/internal/storage/segment.go +++ b/banyand/internal/storage/segment.go @@ -182,7 +182,7 @@ func (sc *segmentController[T, O]) segments() (ss []*segment[T]) { func (sc *segmentController[T, O]) Current() (bucket.Reporter, error) { now := sc.segmentSize.Unit.standard(sc.clock.Now()) - ns := uint64(now.UnixNano()) + ns := now.UnixNano() if b := func() bucket.Reporter { sc.RLock() defer sc.RUnlock() @@ -275,7 +275,7 @@ func (sc *segmentController[T, O]) create(start time.Time) (*segment[T], error) start = sc.segmentSize.Unit.standard(start) var next *segment[T] for _, s := range sc.lst { - if s.Contains(uint64(start.UnixNano())) { + if s.Contains(start.UnixNano()) { return s, nil } if next == nil && s.Start.After(start) { @@ -334,7 +334,7 @@ func (sc *segmentController[T, O]) load(start, end time.Time, root string) (seg func (sc *segmentController[T, O]) remove(deadline time.Time) (err error) { sc.l.Info().Time("deadline", deadline).Msg("start to remove before deadline") for _, s := range sc.segments() { - if s.End.Before(deadline) || s.Contains(uint64(deadline.UnixNano())) { + if s.End.Before(deadline) || s.Contains(deadline.UnixNano()) { if e := sc.l.Debug(); e.Enabled() { e.Stringer("segment", s).Msg("start to remove data in a segment") } diff --git a/banyand/measure/write.go b/banyand/measure/write.go index 4ec45466..079091fc 100644 --- a/banyand/measure/write.go +++ b/banyand/measure/write.go @@ -54,7 +54,7 @@ func (w *writeCallback) handle(dst map[string]*dataPointsInGroup, writeEvent *me if err := timestamp.Check(t); err != nil { return nil, fmt.Errorf("invalid timestamp: %w", err) } - ts := uint64(t.UnixNano()) + ts := t.UnixNano() gn := req.Metadata.Group tsdb, err := w.schemaRepo.loadTSDB(gn) @@ -89,7 +89,7 @@ func (w *writeCallback) handle(dst map[string]*dataPointsInGroup, writeEvent *me } dpg.tables = append(dpg.tables, dpt) } - dpt.dataPoints.timestamps = append(dpt.dataPoints.timestamps, int64(ts)) + dpt.dataPoints.timestamps = append(dpt.dataPoints.timestamps, ts) stm, ok := w.schemaRepo.loadMeasure(writeEvent.GetRequest().GetMetadata()) if !ok { return nil, fmt.Errorf("cannot find measure definition: %s", writeEvent.GetRequest().GetMetadata()) diff --git a/banyand/stream/index.go b/banyand/stream/index.go index 437d3f10..d29b1df4 100644 --- a/banyand/stream/index.go +++ b/banyand/stream/index.go @@ -90,7 +90,7 @@ func (e *elementIndex) Close() error { type elementRef struct { seriesID common.SeriesID - timestamp uint64 + timestamp int64 } type indexedElementRef struct { @@ -130,7 +130,7 @@ func merge(postingMap map[common.SeriesID][]uint64) []elementRef { for seriesID, timestamps := range postingMap { if len(timestamps) > 0 { - er := elementRef{seriesID: seriesID, timestamp: timestamps[0]} + er := elementRef{seriesID: seriesID, timestamp: int64(timestamps[0])} item := {elementRef: er, elemIdx: 0} heap.Push(, item) } @@ -141,7 +141,7 @@ func merge(postingMap map[common.SeriesID][]uint64) []elementRef { if item.elemIdx+1 < len(postingMap[item.seriesID]) { nextTS := postingMap[item.seriesID][item.elemIdx+1] - nextEr := elementRef{seriesID: item.seriesID, timestamp: nextTS} + nextEr := elementRef{seriesID: item.seriesID, timestamp:
Re: [PR] Add document for column-based storage [skywalking-banyandb]
wu-sheng commented on PR #435: URL: https://github.com/apache/skywalking-banyandb/pull/435#issuecomment-2074346395 > ERROR: 1 dead links found! [✖] https://ubuntu.com/wsl → Status: 0 But this website seems to redirect to `https://ubuntu.com/desktop/wsl`. Docs may need a update? -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(skywalking-banyandb) 05/05: Remove empty shards
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch stream-load in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git commit 157cc9d3681e08cb299424d07c74b30e413be7b3 Author: Gao Hongtao AuthorDate: Wed Apr 24 07:48:21 2024 + Remove empty shards Signed-off-by: Gao Hongtao --- banyand/internal/storage/retention.go| 10 +-- banyand/internal/storage/tsdb.go | 94 +--- banyand/stream/iter_builder.go | 6 +- banyand/stream/write.go | 6 +- test/cases/stream/data/want/sort_filter.yaml | 17 + test/stress/trace/trace_suite_test.go| 4 +- 6 files changed, 87 insertions(+), 50 deletions(-) diff --git a/banyand/internal/storage/retention.go b/banyand/internal/storage/retention.go index 445b7f56..87e25ff0 100644 --- a/banyand/internal/storage/retention.go +++ b/banyand/internal/storage/retention.go @@ -51,13 +51,13 @@ func newRetentionTask[T TSTable, O any](database *database[T, O], ttl IntervalRu } func (rc *retentionTask[T, O]) run(now time.Time, l *logger.Logger) bool { - var shardList []*shard[T, O] - rc.database.RLock() - shardList = append(shardList, rc.database.sLst...) - rc.database.RUnlock() + shardList := rc.database.sLst.Load() + if shardList == nil { + return false + } deadline := now.Add(-rc.duration) - for _, shard := range shardList { + for _, shard := range *shardList { if err := shard.segmentController.remove(deadline); err != nil { l.Error().Err(err) } diff --git a/banyand/internal/storage/tsdb.go b/banyand/internal/storage/tsdb.go index 7479b5de..698827a6 100644 --- a/banyand/internal/storage/tsdb.go +++ b/banyand/internal/storage/tsdb.go @@ -74,18 +74,20 @@ type database[T TSTable, O any] struct { scheduler *timestamp.Scheduler p common.Position locationstring - sLst[]*shard[T, O] + sLstatomic.Pointer[[]*shard[T, O]] optsTSDBOpts[T, O] sync.RWMutex - sLen uint32 } func (d *database[T, O]) Close() error { d.Lock() defer d.Unlock() d.scheduler.Close() - for _, s := range d.sLst { - s.close() + sLst := d.sLst.Load() + if sLst != nil { + for _, s := range *sLst { + s.close() + } } d.lock.Close() if err := lfs.DeleteFile(d.lock.Path()); err != nil { @@ -139,58 +141,77 @@ func OpenTSDB[T TSTable, O any](ctx context.Context, opts TSDBOpts[T, O]) (TSDB[ } func (d *database[T, O]) CreateTSTableIfNotExist(shardID common.ShardID, ts time.Time) (TSTableWrapper[T], error) { - id := uint32(shardID) - if id >= atomic.LoadUint32() { - return func() (TSTableWrapper[T], error) { - d.Lock() - defer d.Unlock() - if int(id) >= len(d.sLst) { - for i := len(d.sLst); i <= int(id); i++ { - d.logger.Info().Int("shard_id", i).Msg("creating a shard") - if err := d.registerShard(i); err != nil { - return nil, err - } - } + if s, ok := d.getShard(shardID); ok { + d.RLock() + defer d.RUnlock() + return d.createTSTTable(s, ts) + } + d.Lock() + defer d.Unlock() + if s, ok := d.getShard(shardID); ok { + return d.createTSTTable(s, ts) + } + d.logger.Info().Int("shard_id", int(shardID)).Msg("creating a shard") + s, err := d.registerShard(shardID) + if err != nil { + return nil, err + } + return d.createTSTTable(s, ts) +} + +func (d *database[T, O]) getShard(shardID common.ShardID) (*shard[T, O], bool) { + sLst := d.sLst.Load() + if sLst != nil { + for _, s := range *sLst { + if s.id == shardID { + return s, true } - return d.createTSTTable(shardID, ts) - }() + } } - d.RLock() - defer d.RUnlock() - return d.createTSTTable(shardID, ts) + return nil, false } -func (d *database[T, O]) createTSTTable(shardID common.ShardID, ts time.Time) (TSTableWrapper[T], error) { +func (d *database[T, O]) createTSTTable(shard *shard[T, O], ts time.Time) (TSTableWrapper[T], error) { timeRange := timestamp.NewInclusiveTimeRange(ts, ts) - ss := d.sLst[shardID].segmentController.selectTSTables(timeRange) + ss :=
(skywalking-banyandb) branch stream-load updated (40e9d276 -> 157cc9d3)
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a change to branch stream-load in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git from 40e9d276 Fix issues found by tracing test new 45479977 Remove values from index new 78aeb8e1 Remove term dependencies new cfad43a5 Won't store term in the index new 33ed8982 Fetch all series in a single sort query new 157cc9d3 Remove empty shards The 5 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: banyand/internal/storage/index.go | 17 +- banyand/internal/storage/retention.go | 10 +- banyand/internal/storage/segment.go| 6 +- banyand/internal/storage/tsdb.go | 94 + banyand/liaison/grpc/measure.go| 2 +- banyand/liaison/grpc/stream.go | 2 +- banyand/measure/write.go | 4 +- banyand/stream/index.go| 10 +- banyand/stream/iter.go | 129 ++-- banyand/stream/iter_builder.go | 133 ++-- banyand/stream/part.go | 81 banyand/stream/query.go| 34 ++-- banyand/stream/tstable.go | 3 +- banyand/stream/write.go| 36 ++-- pkg/index/index.go | 14 +- pkg/index/inverted/inverted.go | 219 +++- pkg/index/inverted/inverted_test.go| 20 +- pkg/index/inverted/sort.go | 82 +--- pkg/index/inverted/sort_test.go| 226 + pkg/index/testcases/duration.go| 41 +--- pkg/index/testcases/service_name.go| 1 + pkg/pb/v1/series.go| 9 + pkg/test/query/trace.go| 2 +- pkg/timestamp/range.go | 4 +- .../data/input/{less.yaml => sort_filter.yaml} | 5 +- .../data/want/{less.yaml => sort_filter.yaml} | 12 +- test/cases/stream/stream.go| 1 + test/docker/base-compose.yml | 10 +- test/stress/trace/docker-compose-cluster.yaml | 34 test/stress/trace/docker-compose-single.yaml | 16 +- test/stress/trace/trace_suite_test.go | 6 +- 31 files changed, 748 insertions(+), 515 deletions(-) create mode 100644 pkg/index/inverted/sort_test.go copy test/cases/stream/data/input/{less.yaml => sort_filter.yaml} (93%) copy test/cases/stream/data/want/{less.yaml => sort_filter.yaml} (97%)
(skywalking-banyandb) 01/05: Remove values from index
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch stream-load in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git commit 45479977292530ed03092276908ef93a268ea2bd Author: Gao Hongtao AuthorDate: Sun Apr 21 22:23:20 2024 + Remove values from index Signed-off-by: Gao Hongtao --- pkg/index/index.go | 5 ++--- pkg/index/inverted/inverted.go | 26 -- pkg/index/inverted/sort.go | 15 +++ 3 files changed, 13 insertions(+), 33 deletions(-) diff --git a/pkg/index/index.go b/pkg/index/index.go index e776fa1c..739db07b 100644 --- a/pkg/index/index.go +++ b/pkg/index/index.go @@ -187,9 +187,8 @@ func (i *dummyIterator) Close() error { // PostingValue is the collection of a field's values. type PostingValue struct { - Value posting.List - Term[]byte - TermRaw []byte + Value posting.List + Term []byte } // Document represents a document in a index. diff --git a/pkg/index/inverted/inverted.go b/pkg/index/inverted/inverted.go index 176d6b77..0ab9e835 100644 --- a/pkg/index/inverted/inverted.go +++ b/pkg/index/inverted/inverted.go @@ -245,7 +245,7 @@ func (s *store) MatchTerms(field index.Field) (list posting.List, err error) { if err != nil { return nil, err } - iter := newBlugeMatchIterator(documentMatchIterator, fk, shouldDecodeTerm, 0, reader) + iter := newBlugeMatchIterator(documentMatchIterator, fk, shouldDecodeTerm, reader) defer func() { err = multierr.Append(err, iter.Close()) }() @@ -278,7 +278,7 @@ func (s *store) Match(fieldKey index.FieldKey, matches []string) (posting.List, if err != nil { return nil, err } - iter := newBlugeMatchIterator(documentMatchIterator, fk, false, 0, reader) + iter := newBlugeMatchIterator(documentMatchIterator, fk, false, reader) defer func() { err = multierr.Append(err, iter.Close()) }() @@ -427,17 +427,14 @@ type blugeMatchIterator struct { fieldKey string shouldDecodeTerm bool closed bool - num int - skip int } -func newBlugeMatchIterator(delegated search.DocumentMatchIterator, fieldKey string, shouldDecodeTerm bool, skip int, closer io.Closer) blugeMatchIterator { +func newBlugeMatchIterator(delegated search.DocumentMatchIterator, fieldKey string, shouldDecodeTerm bool, closer io.Closer) blugeMatchIterator { return blugeMatchIterator{ delegated:delegated, fieldKey: fieldKey, shouldDecodeTerm: shouldDecodeTerm, closer: closer, - skip: skip, } } @@ -470,13 +467,9 @@ func (bmi *blugeMatchIterator) nextTerm() bool { } return false } - bmi.num++ - if bmi.num <= bmi.skip { - return true - } i := 0 var docID uint64 - var term, termRaw []byte + var term []byte bmi.err = match.VisitStoredFields(func(field string, value []byte) bool { if field == docIDField { if len(value) == 8 { @@ -490,7 +483,6 @@ func (bmi *blugeMatchIterator) nextTerm() bool { if field == bmi.fieldKey { v := pbytes.Copy(value) if bmi.shouldDecodeTerm { - termRaw = v term = index.UnmarshalTerm(v) } else { term = v @@ -509,9 +501,8 @@ func (bmi *blugeMatchIterator) nextTerm() bool { } if bmi.agg == nil { bmi.agg = { - Term:term, - TermRaw: termRaw, - Value: roaring.NewPostingListWithInitialData(docID), + Term: term, + Value: roaring.NewPostingListWithInitialData(docID), } return true } @@ -521,9 +512,8 @@ func (bmi *blugeMatchIterator) nextTerm() bool { } bmi.current = bmi.agg bmi.agg = { - Term:term, - TermRaw: termRaw, - Value: roaring.NewPostingListWithInitialData(docID), + Term: term, + Value: roaring.NewPostingListWithInitialData(docID), } return false } diff --git a/pkg/index/inverted/sort.go b/pkg/index/inverted/sort.go index 60c434ae..12835eca 100644 --- a/pkg/index/inverted/sort.go +++ b/pkg/index/inverted/sort.go @@ -19,7 +19,6 @@ package inverted import ( - "bytes" "context" "errors" "io" @@ -37,8 +36,6 @@ type sortIterator struct { current *blugeMatchIterator
(skywalking-banyandb) 04/05: Fetch all series in a single sort query
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch stream-load in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git commit 33ed8982b06eb31d5c3049172b338ef4595d266c Author: Gao Hongtao AuthorDate: Wed Apr 24 01:39:42 2024 + Fetch all series in a single sort query Signed-off-by: Gao Hongtao --- banyand/internal/storage/index.go | 2 +- banyand/liaison/grpc/measure.go | 2 +- banyand/liaison/grpc/stream.go| 2 +- banyand/stream/index.go | 4 +- banyand/stream/iter.go| 20 +-- banyand/stream/iter_builder.go| 90 -- banyand/stream/part.go| 75 - banyand/stream/query.go | 25 +-- banyand/stream/tstable.go | 1 + banyand/stream/write.go | 14 +- pkg/index/index.go| 7 +- pkg/index/inverted/inverted.go| 96 ++- pkg/index/inverted/inverted_test.go | 20 +-- pkg/index/inverted/sort.go| 51 +- pkg/index/inverted/sort_test.go | 226 ++ pkg/index/testcases/duration.go | 4 +- pkg/index/testcases/service_name.go | 1 + pkg/pb/v1/series.go | 9 + pkg/test/query/trace.go | 2 +- test/cases/stream/data/input/sort_filter.yaml | 36 test/cases/stream/data/want/sort_filter.yaml | 52 ++ test/cases/stream/stream.go | 1 + test/stress/trace/docker-compose-cluster.yaml | 34 test/stress/trace/trace_suite_test.go | 2 +- 24 files changed, 578 insertions(+), 198 deletions(-) diff --git a/banyand/internal/storage/index.go b/banyand/internal/storage/index.go index acb4086b..575ec706 100644 --- a/banyand/internal/storage/index.go +++ b/banyand/internal/storage/index.go @@ -198,7 +198,7 @@ func (s *seriesIndex) Search(ctx context.Context, series *pbv1.Series, filter in var sortedSeriesList pbv1.SeriesList for iter.Next() { - seriesID := iter.Val() + seriesID, _ := iter.Val() if !pl.Contains(seriesID) { continue } diff --git a/banyand/liaison/grpc/measure.go b/banyand/liaison/grpc/measure.go index d149aef5..13a8399b 100644 --- a/banyand/liaison/grpc/measure.go +++ b/banyand/liaison/grpc/measure.go @@ -64,7 +64,7 @@ func (ms *measureService) activeIngestionAccessLog(root string) (err error) { func (ms *measureService) Write(measure measurev1.MeasureService_WriteServer) error { reply := func(metadata *commonv1.Metadata, status modelv1.Status, messageId uint64, measure measurev1.MeasureService_WriteServer, logger *logger.Logger) { if errResp := measure.Send({Metadata: metadata, Status: status, MessageId: messageId}); errResp != nil { - logger.Err(errResp).Msg("failed to send response") + logger.Debug().Err(errResp).Msg("failed to send response") } } ctx := measure.Context() diff --git a/banyand/liaison/grpc/stream.go b/banyand/liaison/grpc/stream.go index 5775dcf2..0a8946cf 100644 --- a/banyand/liaison/grpc/stream.go +++ b/banyand/liaison/grpc/stream.go @@ -64,7 +64,7 @@ func (s *streamService) activeIngestionAccessLog(root string) (err error) { func (s *streamService) Write(stream streamv1.StreamService_WriteServer) error { reply := func(metadata *commonv1.Metadata, status modelv1.Status, messageId uint64, stream streamv1.StreamService_WriteServer, logger *logger.Logger) { if errResp := stream.Send({Metadata: metadata, Status: status, MessageId: messageId}); errResp != nil { - logger.Err(errResp).Msg("failed to send response") + logger.Debug().Err(errResp).Msg("failed to send response") } } publisher := s.pipeline.NewBatchPublisher(s.writeTimeout) diff --git a/banyand/stream/index.go b/banyand/stream/index.go index d29b1df4..e0021302 100644 --- a/banyand/stream/index.go +++ b/banyand/stream/index.go @@ -52,8 +52,8 @@ func newElementIndex(ctx context.Context, root string, flushTimeoutSeconds int64 return ei, nil } -func (e *elementIndex) Iterator(fieldKey index.FieldKey, termRange index.RangeOpts, order modelv1.Sort, preloadSize int) (index.FieldIterator, error) { - iter, err := e.store.Iterator(fieldKey, termRange, order, preloadSize) +func (e *elementIndex) Sort(sids []common.SeriesID, fieldKey index.FieldKey, order modelv1.Sort, preloadSize int) (index.FieldIterator, error) { + iter, err := e.store.Sort(sids, fieldKey, order, preloadSize) if err != nil { return nil, err } diff --git
(skywalking-banyandb) 03/05: Won't store term in the index
This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch stream-load in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git commit cfad43a5bb597d7d5195a123614595e6b534ab3c Author: Gao Hongtao AuthorDate: Mon Apr 22 06:32:12 2024 + Won't store term in the index Signed-off-by: Gao Hongtao --- banyand/internal/storage/index.go| 17 ++-- banyand/stream/iter.go | 69 ++- banyand/stream/write.go | 10 +-- pkg/index/index.go | 12 +-- pkg/index/inverted/inverted.go | 127 +++ pkg/index/inverted/sort.go | 24 +++-- pkg/index/testcases/duration.go | 39 ++-- test/docker/base-compose.yml | 10 +-- test/stress/trace/docker-compose-single.yaml | 16 ++-- 9 files changed, 104 insertions(+), 220 deletions(-) diff --git a/banyand/internal/storage/index.go b/banyand/internal/storage/index.go index af7eaed4..acb4086b 100644 --- a/banyand/internal/storage/index.go +++ b/banyand/internal/storage/index.go @@ -198,14 +198,11 @@ func (s *seriesIndex) Search(ctx context.Context, series *pbv1.Series, filter in var sortedSeriesList pbv1.SeriesList for iter.Next() { - pv := iter.Val().Value - if err = pv.Intersect(pl); err != nil { - return nil, err - } - if pv.IsEmpty() { + seriesID := iter.Val() + if !pl.Contains(seriesID) { continue } - sortedSeriesList = appendSeriesList(sortedSeriesList, seriesList, pv) + sortedSeriesList = appendSeriesList(sortedSeriesList, seriesList, common.SeriesID(seriesID)) if err != nil { return nil, err } @@ -223,12 +220,12 @@ func filterSeriesList(seriesList pbv1.SeriesList, filter posting.List) pbv1.Seri return seriesList } -func appendSeriesList(dest, src pbv1.SeriesList, filter posting.List) pbv1.SeriesList { +func appendSeriesList(dest, src pbv1.SeriesList, target common.SeriesID) pbv1.SeriesList { for i := 0; i < len(src); i++ { - if !filter.Contains(uint64(src[i].ID)) { - continue + if target == src[i].ID { + dest = append(dest, src[i]) + break } - dest = append(dest, src[i]) } return dest } diff --git a/banyand/stream/iter.go b/banyand/stream/iter.go index 5f9abb80..94be97f2 100644 --- a/banyand/stream/iter.go +++ b/banyand/stream/iter.go @@ -25,14 +25,12 @@ import ( "github.com/apache/skywalking-banyandb/api/common" "github.com/apache/skywalking-banyandb/pkg/index" - "github.com/apache/skywalking-banyandb/pkg/index/posting" "github.com/apache/skywalking-banyandb/pkg/logger" pbv1 "github.com/apache/skywalking-banyandb/pkg/pb/v1" ) type searcherIterator struct { fieldIterator index.FieldIterator - cur posting.Iterator err error indexFilter filterFn timeFilterfilterFn @@ -64,46 +62,37 @@ func (s *searcherIterator) Next() bool { if s.err != nil { return false } - if s.cur == nil { - if s.fieldIterator.Next() { - v := s.fieldIterator.Val() - s.cur = v.Value.Iterator() - } else { - s.err = io.EOF - return false - } + if !s.fieldIterator.Next() { + s.err = io.EOF + return false + } + itemID := s.fieldIterator.Val() + if !s.timeFilter(itemID) { + return s.Next() + } + if s.indexFilter != nil && !s.indexFilter(itemID) { + return s.Next() + } + if e := s.l.Debug(); e.Enabled() { + e.Uint64("series_id", uint64(s.seriesID)).Uint64("item_id", itemID).Msg("got an item") + } + e, c, err := s.table.getElement(s.seriesID, int64(itemID), s.tagProjection) + if err != nil { + s.err = err + return false + } + sv, err := s.sortedTagLocation.getTagValue(e) + if err != nil { + s.err = err + return false } - if s.cur.Next() { - itemID := s.cur.Current() - if !s.timeFilter(itemID) { - return s.Next() - } - if s.indexFilter != nil && !s.indexFilter(itemID) { - return s.Next() - } - if e := s.l.Debug(); e.Enabled() { - e.Uint64("series_id", uint64(s.seriesID)).Uint64("item_id",
Re: [PR] Add document for column-based storage [skywalking-banyandb]
ButterBright commented on PR #435: URL: https://github.com/apache/skywalking-banyandb/pull/435#issuecomment-2074397317 > > ERROR: 1 dead links found! > > [✖] https://ubuntu.com/wsl → Status: 0 > > But this website seems to redirect to `https://ubuntu.com/desktop/wsl`. Docs may need a update? Let me fix these links. -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org