Skip to content

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Mar 14, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

refactor(meta): adopt databendlabs/watcher crate for shared state machine logic
refactor(meta): adopt databendlabs/map-api crate for shared state machine logic

This commit replaces the internal map API implementation with the
external crate databendlabs/map-api.

Context:

In the future, the meta-service codebase will be shared across two main
products:

  1. A Raft-based meta-service.
  2. An S3-based meta-service.

The state machine logic for these services is largely identical and
should be effectively shared to maximize code reuse and maintainability.
Using the databendlabs/map-api crate facilitates this shared
implementation.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Other

Related Issues


This change is Reviewable

@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label Mar 14, 2025
@drmingdrmer drmingdrmer marked this pull request as ready for review March 14, 2025 15:06
@drmingdrmer drmingdrmer changed the title refactor(meta): adopt databendlabs/watcher crate for shared state machine logic refactor(meta): adopt external crate for shared state machine logic Mar 14, 2025
…achine logic

This commit replaces the internal map API implementation with the
external crate `databendlabs/map-api`.

### Context:

In the future, the meta-service codebase will be shared across two main
products:
1. A Raft-based meta-service.
2. An S3-based meta-service.

The state machine logic for these services is largely identical and
should be effectively shared to maximize code reuse and maintainability.
Using the `databendlabs/map-api` crate facilitates this shared
implementation.
@drmingdrmer drmingdrmer force-pushed the 203-external-crates branch from d0be347 to 73efe6a Compare March 15, 2025 05:20
@drmingdrmer drmingdrmer merged commit 68fb600 into databendlabs:main Mar 15, 2025
76 checks passed
loloxwg pushed a commit to loloxwg/databend that referenced this pull request Apr 3, 2025
…atabendlabs#17609)

* refactor(meta): adopt `databendlabs/map-api` crate for shared state machine logic

This commit replaces the internal map API implementation with the
external crate `databendlabs/map-api`.

### Context:

In the future, the meta-service codebase will be shared across two main
products:
1. A Raft-based meta-service.
2. An S3-based meta-service.

The state machine logic for these services is largely identical and
should be effectively shared to maximize code reuse and maintainability.
Using the `databendlabs/map-api` crate facilitates this shared
implementation.

* refactor(meta): adopt `databendlabs/watcher` crate for shared state machine logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-refactor this PR changes the code base without new features or bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant