Skip to content

Commit 702664f

Browse files
authored
fix: Use async lock in reqsign to prevent concurrent update (#18265)
* Remove not used api Signed-off-by: Xuanwo <github@xuanwo.io> * Fix Signed-off-by: Xuanwo <github@xuanwo.io> --------- Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 4283b2d commit 702664f

File tree

3 files changed

+5
-24
lines changed

3 files changed

+5
-24
lines changed

Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/common/storage/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ mod http_client;
3939
pub use http_client::StorageHttpClient;
4040

4141
mod operator;
42-
pub use operator::build_operator;
4342
pub use operator::check_operator;
4443
pub use operator::init_operator;
4544
pub use operator::DataOperator;

src/common/storage/src/operator.rs

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,7 @@ pub(crate) fn init_operator_uncached(cfg: &StorageParams) -> Result<Operator> {
146146
/// ```
147147
///
148148
/// Please balance the performance and compile time.
149-
pub fn build_operator<B: Builder>(
150-
builder: B,
151-
cfg: Option<&StorageNetworkParams>,
152-
) -> Result<Operator> {
149+
fn build_operator<B: Builder>(builder: B, cfg: Option<&StorageNetworkParams>) -> Result<Operator> {
153150
let ob = Operator::new(builder)?
154151
// Timeout layer is required to be the first layer so that internal
155152
// futures can be cancelled safely when the timeout is reached.
@@ -558,24 +555,8 @@ impl DataOperator {
558555
Ok(())
559556
}
560557

561-
/// Create a new data operator without check.
562-
pub fn try_new(
563-
conf: &StorageConfig,
564-
spill_params: Option<StorageParams>,
565-
) -> databend_common_exception::Result<DataOperator> {
566-
let operator = init_operator(&conf.params)?;
567-
let spill_operator = spill_params.as_ref().map(init_operator).transpose()?;
568-
569-
Ok(DataOperator {
570-
operator,
571-
params: conf.params.clone(),
572-
spill_operator,
573-
spill_params,
574-
})
575-
}
576-
577558
#[async_backtrace::framed]
578-
pub async fn try_create(
559+
async fn try_create(
579560
conf: &StorageConfig,
580561
spill_params: Option<StorageParams>,
581562
) -> databend_common_exception::Result<DataOperator> {

0 commit comments

Comments
 (0)