Skip to content

Commit 0f70c07

Browse files
committed
fix data_disabled when features not opened
1 parent ed55af8 commit 0f70c07

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

src/wal/src/config.rs

+30-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,36 @@ 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+
false
55+
}
56+
}
57+
Self::Obkv(c) => {
58+
#[cfg(feature = "wal-table-kv")]
59+
{
60+
c.disable_data
61+
}
62+
#[cfg(not(feature = "wal-table-kv"))]
63+
{
64+
false
65+
}
66+
}
67+
Self::Kafka(c) => {
68+
#[cfg(feature = "wal-message-queue")]
69+
{
70+
c.disable_data
71+
}
72+
#[cfg(not(feature = "wal-message-queue"))]
73+
{
74+
false
75+
}
76+
}
5077
}
5178
}
5279
}

0 commit comments

Comments
 (0)