Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tiered storage] store driver name and driver specific metadata in original ledger metadata #2398

Merged
merged 6 commits into from
Aug 21, 2018

Conversation

sijie
Copy link
Member

@sijie sijie commented Aug 17, 2018

Motivation

  1. Currently the location of an offloaded ledger isn't stored in the original ledger metadata.
    That means if configuration is changed or modified by mistake. We might potentially cause data loss.

  2. The location of an offloaded ledger is needed by Pulsar SQL. so it is very inconvinient to
    have the location information stored in a configuration and the approach is also problematic.

Changes

Store driverName and driver-specific metadata (e.g. bucket name, region name, endpoint) in the
original ledger metadata. Change ManagedLedgerImpl to use the driver-specific metadata to read
the offloaded ledger. If the driver-specific metadata is missed, it will fall back to use the configuration.

Tests

This change doesn't change the behavior. Existing unit tests and integration tests already covered the logic.

NOTES

Currently the driver name in metadata is not used. We need to use driver name to load different offloader driver
after #2393 is implemented

 ### Motivation

os extension plugin is required by managed-ledger as well.

 ### Change

move the extension to the root pom file.
…iginal ledger metadata

 ### Motivation

1) Currently the location of an offloaded ledger isn't stored in the original ledger metadata.
That means if configuration is changed or modified by mistake. We might potentially cause data loss.

2) The location of an offloaded ledger is needed by Pulsar SQL. so it is very inconvinient to
have the location information stored in a configuration and the approach is also problematic.

 ### Changes

Store `driverName` and driver-specific metadata (e.g. bucket name, region name, endpoint) in the
original ledger metadata. Change ManagedLedgerImpl to use the driver-specific metadata to read
the offloaded ledger. If the driver-specific metadata is missed, it will fall back to use the configuration.

 ### Tests

This change doesn't change the behavior. Existing unit tests and integration tests already covered the logic.

 ### NOTES

Currently the driver name in metadata is not used. We need to use driver name to load different offloader driver
after apache#2393 is implemented
@sijie sijie added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/tieredstorage labels Aug 17, 2018
@sijie sijie added this to the 2.2.0-incubating milestone Aug 17, 2018
@sijie sijie self-assigned this Aug 17, 2018
@sijie
Copy link
Member Author

sijie commented Aug 17, 2018

run integration tests

@jiazhai
Copy link
Member

jiazhai commented Aug 21, 2018

run integration tests

@sijie sijie merged commit 5980169 into apache:master Aug 21, 2018
@sijie sijie deleted the record_driver_region_bucket_in_metadata branch August 21, 2018 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tieredstorage type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants