jiacai2050 commented on code in PR #1619:
URL: https://github.com/apache/horaedb/pull/1619#discussion_r1897189250
##########
src/metric_engine/src/config.rs:
##########
@@ -15,40 +15,41 @@
// specific language governing permissions and limitations
// under the License.
-use std::{collections::HashMap, time::Duration};
+use std::collections::HashMap;
+use common::{ReadableDuration, ReadableSize};
use parquet::basic::{Compression, Encoding, ZstdLevel};
use serde::{Deserialize, Serialize};
-#[derive(Debug, Deserialize, Serialize)]
+#[derive(Debug, Deserialize, Serialize, Clone, PartialEq)]
#[serde(default, deny_unknown_fields)]
pub struct SchedulerConfig {
- pub schedule_interval: Duration,
+ pub schedule_interval: ReadableDuration,
pub max_pending_compaction_tasks: usize,
// Runner config
- pub memory_limit: u64,
+ pub memory_limit: ReadableSize,
// Picker config
- pub ttl: Option<Duration>,
- pub new_sst_max_size: u64,
+ pub ttl: Option<ReadableDuration>,
+ pub new_sst_max_size: ReadableSize,
pub input_sst_max_num: usize,
pub input_sst_min_num: usize,
}
impl Default for SchedulerConfig {
fn default() -> Self {
Self {
- schedule_interval: Duration::from_secs(10),
+ schedule_interval: ReadableDuration::secs(10),
max_pending_compaction_tasks: 10,
- memory_limit: bytesize::gb(20_u64),
+ memory_limit: ReadableSize::gb(20_u64),
Review Comment:
```suggestion
memory_limit: ReadableSize::gb(2_u64),
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]