Skip to content

Commit 873bf09

Browse files
fix(redis-enterprise): correct master_persistence type from String to bool (#348)
The Redis Enterprise API returns master_persistence as a boolean value (false), not a string. This mismatch was causing deserialization errors when fetching database information. Fixes #347
1 parent 4a3bd92 commit 873bf09

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

crates/redis-enterprise/src/bdb.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ pub struct DatabaseInfo {
227227
pub crdt_repl_backlog_size: Option<String>,
228228

229229
// Replication settings
230-
pub master_persistence: Option<String>,
230+
pub master_persistence: Option<bool>,
231231
pub slave_ha: Option<bool>,
232232
pub slave_ha_priority: Option<u32>,
233233
pub replica_read_only: Option<bool>,

crates/redis-enterprise/tests/database_tests.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ fn test_database() -> serde_json::Value {
2626
"type": "redis",
2727
"memory_size": 1073741824,
2828
"port": 12000,
29-
"status": "active"
29+
"status": "active",
30+
"master_persistence": false,
31+
"data_persistence": "disabled"
3032
})
3133
}
3234

0 commit comments

Comments
 (0)