File tree 3 files changed +13
-3
lines changed
3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ echo "line_cov $line_cov"
17
17
18
18
# enable threshold
19
19
# COVERAGE_THRESHOLD=80
20
- FUNC_COV_THRESHOLD=40
21
- LINE_COV_THRESHOLD=35
22
- REGION_COV_THRESHOLD=25
20
+ FUNC_COV_THRESHOLD=60
21
+ LINE_COV_THRESHOLD=53
22
+ REGION_COV_THRESHOLD=40
23
23
24
24
# clean up
25
25
# find ./target -name llvm-cov-target -type d|xargs rm -fR
Original file line number Diff line number Diff line change @@ -196,6 +196,8 @@ pub struct Limit {
196
196
pub hb_interval : i64 ,
197
197
// no need set by environment
198
198
pub cpu_num : usize ,
199
+ #[ env_config( name = "ZO_COLS_PER_RECORD_LIMIT" ) ]
200
+ pub req_cols_per_record_limit : usize ,
199
201
}
200
202
201
203
#[ derive( Clone , Debug , EnvConfig ) ]
@@ -316,6 +318,10 @@ pub fn init() -> Config {
316
318
panic ! ( "data path config error: {}" , e) ;
317
319
}
318
320
321
+ if cfg. limit . req_cols_per_record_limit == 0 {
322
+ cfg. limit . req_cols_per_record_limit = 1000 ;
323
+ }
324
+
319
325
// check memeory cache
320
326
if let Err ( e) = check_memory_cache_config ( & mut cfg) {
321
327
panic ! ( "memory cache config error: {}" , e) ;
Original file line number Diff line number Diff line change @@ -202,6 +202,10 @@ pub async fn check_for_schema(
202
202
return ( true , None ) ;
203
203
}
204
204
205
+ if inferred_schema. fields . len ( ) > CONFIG . limit . req_cols_per_record_limit {
206
+ return ( false , None ) ;
207
+ }
208
+
205
209
if schema == Schema :: empty ( ) {
206
210
stream_schema_map. insert ( stream_name. to_string ( ) , inferred_schema. clone ( ) ) ;
207
211
db:: schema:: set (
You can’t perform that action at this time.
0 commit comments