Skip to content

Commit dfd83e5

Browse files
committed
fix: consolidate STACKABE_LOG_DIR import; remove empty vec allocation; commet region mover timeout
1 parent aad5110 commit dfd83e5

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

rust/operator-binary/src/controller/build/properties/hbase_site.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ pub fn build(
5555

5656
config.extend(zookeeper_config);
5757
config.extend(kerberos_config);
58-
config.extend(opa_config.map_or(vec![], |config| config.hbase_site_config()));
58+
if let Some(opa_config) = opa_config {
59+
config.extend(opa_config.hbase_site_config());
60+
}
5961

6062
// Set flag to override default behaviour, which is that the
6163
// RPC client should bind the client address (forcing outgoing

rust/operator-binary/src/controller/build/properties/product_logging/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
//! Renders the logging config files (`log4j2.properties` and the Vector agent config)
22
//! assembled into the rolegroup `ConfigMap`.
33
4-
pub use stackable_operator::v2::product_logging::framework::STACKABLE_LOG_DIR;
54
use stackable_operator::{
65
memory::{BinaryMultiple, MemoryQuantity},
76
product_logging::{self, spec::AutomaticContainerLogConfig},
8-
v2::product_logging::framework::ValidatedContainerLogConfigChoice,
7+
v2::product_logging::framework::{STACKABLE_LOG_DIR, ValidatedContainerLogConfigChoice},
98
};
109

1110
pub const MAX_HBASE_LOG_FILES_SIZE: MemoryQuantity = MemoryQuantity {

rust/operator-binary/src/controller/build/region_mover.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ use stackable_operator::shared::time::Duration;
77

88
use crate::crd::AnyServiceConfig;
99

10+
/// Fallback region-mover timeout, used only when no graceful shutdown timeout is set. In practice
11+
/// the merged config always defaults `graceful_shutdown_timeout` (60m for region servers), so this
12+
/// is a defensive default; it mirrors that 60m default minus [`DEFAULT_REGION_MOVER_DELTA_TO_SHUTDOWN`].
1013
const DEFAULT_REGION_MOVER_TIMEOUT: Duration = Duration::from_minutes_unchecked(59);
14+
/// Time reserved before the graceful shutdown deadline, subtracted from the configured timeout so
15+
/// the region move finishes before the pod is terminated.
1116
const DEFAULT_REGION_MOVER_DELTA_TO_SHUTDOWN: Duration = Duration::from_minutes_unchecked(1);
1217

1318
impl AnyServiceConfig {

rust/operator-binary/src/controller/build/resource/statefulset.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ use stackable_operator::{
2626
product_logging,
2727
v2::{
2828
builder::pod::container::{EnvVarName, EnvVarSet, new_container_builder},
29-
product_logging::framework::{ValidatedContainerLogConfigChoice, vector_container},
29+
product_logging::framework::{
30+
STACKABLE_LOG_DIR, ValidatedContainerLogConfigChoice, vector_container,
31+
},
3032
types::{
3133
kubernetes::{ContainerName, VolumeName},
3234
operator::RoleGroupName,
@@ -40,7 +42,7 @@ use crate::{
4042
build::{
4143
graceful_shutdown::{self, add_graceful_shutdown_config},
4244
kerberos::{self, add_kerberos_pod_config},
43-
properties::product_logging::{MAX_HBASE_LOG_FILES_SIZE, STACKABLE_LOG_DIR},
45+
properties::product_logging::MAX_HBASE_LOG_FILES_SIZE,
4446
},
4547
},
4648
crd::{CONFIG_DIR_NAME, HbaseRole, LISTENER_VOLUME_DIR, LISTENER_VOLUME_NAME},

0 commit comments

Comments
 (0)