Skip to content

[improve][broker] Migrate remaining broker proto files from protobuf to LightProto - #25337

Merged
lhotari merged 2 commits into
apache:masterfrom
merlimat:lightproto-conversions
Mar 19, 2026
Merged

[improve][broker] Migrate remaining broker proto files from protobuf to LightProto#25337
lhotari merged 2 commits into
apache:masterfrom
merlimat:lightproto-conversions

Conversation

@merlimat

@merlimat merlimat commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Migrate SchemaStorageFormat, SchemaRegistryFormat, and DelayedMessageIndexBucketMetadata proto files to use LightProto generated code instead of standard protobuf
  • Add the 3 proto files to lightproto-maven-plugin config and remove the protobuf compile goal (keeping only test-compile for test-only proto files)
  • Replace Builder patterns, ByteString, and static parseFrom with LightProto's mutable API, byte[], and instance-based parseFrom

Test plan

  • Verify mvn compile -pl pulsar-broker passes
  • Verify mvn test-compile -pl pulsar-broker passes
  • Run BookkeeperBucketSnapshotStorageTest
  • Run SchemaTest
  • Run schema-related integration tests

Documentation

  • doc-required

    (Your PR needs to update docs and you will update later)

  • doc-not-needed

    (Your PR doesn't need any doc update)

  • doc

    (Your PR contains doc changes)

  • doc-complete

    (Docs have been already added)

…to LightProto

Migrate SchemaStorageFormat, SchemaRegistryFormat, and
DelayedMessageIndexBucketMetadata proto files to use LightProto
generated code instead of standard protobuf.

- Add 3 proto files to lightproto-maven-plugin, remove protobuf compile goal
- Replace Builder patterns with direct mutable object construction
- Replace ByteString with byte[] for bytes fields
- Use indexed loops for repeated field iteration
- Use instance-based parseFrom instead of static parseFrom
- Use forEachDelayedIndexBitMap for map field iteration
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Mar 17, 2026
@codecov-commenter

codecov-commenter commented Mar 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.21622% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.75%. Comparing base (be87cd9) to head (2909eba).
⚠️ Report is 42 commits behind head on master.

Files with missing lines Patch % Lines
...broker/service/schema/BookkeeperSchemaStorage.java 90.00% 7 Missing and 2 partials ⚠️
...oker/service/schema/SchemaRegistryServiceImpl.java 88.00% 1 Missing and 2 partials ⚠️
...g/apache/pulsar/PulsarClusterMetadataTeardown.java 83.33% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #25337       +/-   ##
=============================================
+ Coverage     37.37%   72.75%   +35.37%     
- Complexity    13188    33868    +20680     
=============================================
  Files          1897     1954       +57     
  Lines        150557   154762     +4205     
  Branches      17215    17721      +506     
=============================================
+ Hits          56276   112595    +56319     
+ Misses        86612    33135    -53477     
- Partials       7669     9032     +1363     
Flag Coverage Δ
inttests 25.96% <62.83%> (+0.17%) ⬆️
systests 22.60% <60.13%> (+0.13%) ⬆️
unittests 73.73% <87.83%> (+39.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...elayed/bucket/BookkeeperBucketSnapshotStorage.java 82.81% <100.00%> (+82.81%) ⬆️
.../pulsar/broker/delayed/bucket/ImmutableBucket.java 85.58% <100.00%> (+85.58%) ⬆️
...he/pulsar/broker/delayed/bucket/MutableBucket.java 93.91% <100.00%> (+93.91%) ⬆️
...g/apache/pulsar/PulsarClusterMetadataTeardown.java 74.81% <83.33%> (+3.91%) ⬆️
...oker/service/schema/SchemaRegistryServiceImpl.java 81.04% <88.00%> (+17.75%) ⬆️
...broker/service/schema/BookkeeperSchemaStorage.java 78.14% <90.00%> (+9.46%) ⬆️

... and 1411 files with indirect coverage changes

🚀 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.

@lhotari
lhotari merged commit 9f4bad3 into apache:master Mar 19, 2026
150 of 154 checks passed
@lhotari lhotari added this to the 4.2.0 milestone Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants