chore: reduce unnecessary txns in alter operations (#6133)

This commit is contained in:
jeremyhi
2025-05-20 16:29:49 +08:00
committed by Zhenchi
parent d7cfb741a5
commit b20c1ac797

View File

@@ -256,6 +256,11 @@ impl DatanodeTableManager {
})?
.and_then(|r| DatanodeTableValue::try_from_raw_value(&r.value))?
.region_info;
// If the region options are the same, we don't need to update it.
if region_info.region_options == new_region_options {
return Ok(Txn::new());
}
// substitute region options only.
region_info.region_options = new_region_options;