Skip to content

Commit

Permalink
chore: expose some codes to let other projects use them (#3102)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelScofield authored Jan 5, 2024
1 parent cdc9021 commit e0525db
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/datanode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version.workspace = true
edition.workspace = true
license.workspace = true

[features]
testing = []

[dependencies]
api.workspace = true
arrow-flight.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions src/datanode/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ pub mod heartbeat;
pub mod metrics;
pub mod region_server;
mod store;
#[cfg(test)]
mod tests;
#[cfg(any(test, feature = "testing"))]
pub mod tests;
2 changes: 1 addition & 1 deletion src/frontend/src/instance/standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl DatanodeManager for StandaloneDatanodeManager {
}

/// Relative to [client::region::RegionRequester]
struct RegionInvoker {
pub struct RegionInvoker {
region_server: RegionServer,
}

Expand Down
2 changes: 1 addition & 1 deletion src/meta-srv/src/procedure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ pub mod region_failover;
pub mod region_migration;
#[cfg(test)]
mod tests;
mod utils;
pub mod utils;
2 changes: 1 addition & 1 deletion src/meta-srv/src/procedure/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn region_lock_key(table_id: TableId, region_number: RegionNumber) -> String
format!("{}/region-{}", table_id, region_number)
}

#[cfg(test)]
#[cfg(feature = "mock")]
pub mod mock {
use std::io::Error;
use std::sync::Arc;
Expand Down

0 comments on commit e0525db

Please sign in to comment.