Skip to content

Conversation

ButterBright
Copy link
Member

@ButterBright ButterBright commented Aug 3, 2025

@ButterBright ButterBright added the enhancement New feature or request label Aug 3, 2025
@ButterBright ButterBright added this to the 0.9.0 milestone Aug 3, 2025
@ButterBright ButterBright marked this pull request as draft August 3, 2025 15:52
Copilot

This comment was marked as outdated.

@ButterBright
Copy link
Member Author

I will continue to add unit tests in this PR and implement the traceID-based query in the next one.

@ButterBright ButterBright requested a review from Copilot August 6, 2025 15:19
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new storage engine for trace data in SkyWalking BanyanDB, implementing comprehensive trace storage capabilities with both standalone and distributed modes. The implementation includes file-based and queue-based storage backends with support for indexing, filtering, compression, and synchronization.

  • Adds core trace storage implementation with indexing and filtering
  • Implements both standalone and distributed storage architectures
  • Introduces comprehensive query capabilities with tag filtering and bloom filters

Reviewed Changes

Copilot reviewed 63 out of 65 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/query/model/model.go Adds TraceQueryOptions and TraceResult models for trace queries
pkg/query/logical/trace/index_filter.go Implements filter nodes for trace index operations
docs/api-reference.md Documents new InternalWriteRequest API
banyand/trace/write_standalone.go Implements standalone trace write operations
banyand/trace/write_liaison.go Implements distributed write liaison
banyand/trace/write_data.go Handles chunked data synchronization
banyand/trace/wqueue_test.go Tests for write queue functionality
banyand/trace/wqueue.go Write queue implementation
banyand/trace/tstable_test.go Tests for time series table operations
banyand/trace/tstable.go Core time series table implementation
banyand/trace/tracing.go Tracing utilities and metadata formatting
banyand/trace/traces.go Trace data structures and operations
banyand/trace/trace.go Main trace storage engine configuration
banyand/trace/tag_test.go Tests for tag encoding/decoding
banyand/trace/tag_metadata_test.go Tests for tag metadata operations
banyand/trace/tag_metadata.go Tag metadata management
banyand/trace/tag_filter_test.go Tests for tag filtering with bloom filters
banyand/trace/tag_filter.go Bloom filter implementation for tag filtering
banyand/trace/tag.go Tag value encoding and compression
banyand/trace/syncer.go Data synchronization between nodes
banyand/trace/snapshot_test.go Tests for snapshot operations
banyand/trace/snapshot.go Snapshot management and file operations
banyand/trace/query.go Query operations and tag value conversion
banyand/trace/primary_metadata.go Primary block metadata handling
banyand/trace/part_test.go Tests for part operations and serialization
banyand/trace/part_metadata.go Part metadata and validation
banyand/trace/part_iter.go Iterator implementation for part traversal

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 50.65737% with 2477 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.31%. Comparing base (cffa54c) to head (f41b962).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
banyand/trace/write_standalone.go 0.00% 236 Missing ⚠️
banyand/trace/block.go 50.74% 208 Missing and 23 partials ⚠️
banyand/trace/tstable.go 26.12% 222 Missing and 7 partials ⚠️
banyand/trace/metrics.go 24.57% 221 Missing ⚠️
banyand/trace/part_iter.go 28.78% 184 Missing and 4 partials ⚠️
banyand/trace/merger.go 53.35% 119 Missing and 6 partials ⚠️
banyand/trace/write_liaison.go 0.00% 124 Missing ⚠️
banyand/trace/metadata.go 0.00% 121 Missing ⚠️
banyand/trace/tag.go 67.44% 70 Missing and 27 partials ⚠️
banyand/trace/query.go 0.00% 93 Missing ⚠️
... and 25 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #713       +/-   ##
===========================================
+ Coverage   35.97%   49.31%   +13.34%     
===========================================
  Files         229      261       +32     
  Lines       34998    41076     +6078     
===========================================
+ Hits        12589    20256     +7667     
+ Misses      21353    19101     -2252     
- Partials     1056     1719      +663     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ButterBright ButterBright marked this pull request as ready for review August 10, 2025 16:36
@wu-sheng
Copy link
Member

@ButterBright Please fix CI.

Copy link
Contributor

@hanahmily hanahmily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are design issues with the block.

@hanahmily hanahmily mentioned this pull request Aug 15, 2025
@hanahmily hanahmily merged commit 330704d into apache:main Aug 18, 2025
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Implement Core Storage Structure with TraceID as Primary Key
4 participants