Skip to content

Commit 332dc53

Browse files
committed
fix data_disabled when features not opened
1 parent ed55af8 commit 332dc53

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

src/wal/src/config.rs

+33-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,39 @@ pub enum StorageConfig {
4444
impl StorageConfig {
4545
pub fn data_disabled(&self) -> bool {
4646
match self {
47-
Self::RocksDB(c) => c.disable_data,
48-
Self::Obkv(c) => c.disable_data,
49-
Self::Kafka(c) => c.disable_data,
47+
Self::RocksDB(c) => {
48+
#[cfg(feature = "wal-rocksdb")]
49+
{
50+
c.disable_data
51+
}
52+
#[cfg(not(feature = "wal-rocksdb"))]
53+
{
54+
_ = c;
55+
false
56+
}
57+
}
58+
Self::Obkv(c) => {
59+
#[cfg(feature = "wal-table-kv")]
60+
{
61+
c.disable_data
62+
}
63+
#[cfg(not(feature = "wal-table-kv"))]
64+
{
65+
_ = c;
66+
false
67+
}
68+
}
69+
Self::Kafka(c) => {
70+
#[cfg(feature = "wal-message-queue")]
71+
{
72+
c.disable_data
73+
}
74+
#[cfg(not(feature = "wal-message-queue"))]
75+
{
76+
_ = c;
77+
false
78+
}
79+
}
5080
}
5181
}
5282
}

0 commit comments

Comments
 (0)