10 Commits

Author SHA1 Message Date
zhuwenxing
e3a85be435
test: replace parquet with jsonl for EventRecords and RequestRecords in checker (#46671)
/kind improvement

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
- Core invariant: tests' persistence of EventRecords and RequestRecords
must be append-safe under concurrent writers; this PR replaces Parquet
with JSONL and uses per-file locks and explicit buffer flushes to
guarantee atomic, append-safe writes (EventRecords uses event_lock +
append per line; RequestRecords buffers under request_lock and flushes
to file when threshold or on sink()).

- Logic removed/simplified and rationale: DataFrame-based parquet
append/read logic (pyarrow/fastparquet) and implicit parquet buffering
were removed in favor of simple line-oriented JSON writes and explicit
buffer management. The complex Parquet append/merge paths were redundant
because parquet append under concurrent test-writer patterns caused
corruption; JSONL removes the append-mode complexity and the
parquet-specific buffering/serialization code.

- Why no data loss or behavior regression (concrete code paths):
EventRecords.insert writes a complete JSON object per event under
event_lock to /tmp/ci_logs/event_records_*.jsonl and get_records_df
reads every JSON line under the same lock (or returns an empty DataFrame
with the same schema on FileNotFound/Error), preserving all fields
event_name/event_status/event_ts. RequestRecords.insert appends to an
in-memory buffer under request_lock and triggers _flush_buffer() when
len(buffer) >= 100; _flush_buffer() writes each buffered JSON line to
/tmp/ci_logs/request_records_*.jsonl and clears the buffer; sink() calls
_flush_buffer() under request_lock before get_records_df() reads the
file — ensuring all buffered records are persisted before reads. Both
read paths handle FileNotFoundError and exceptions by returning empty
DataFrames with identical column schemas, so external callers see the
same API and no silent record loss.

- Enhancement summary (concrete): Replaces flaky Parquet append/read
with JSONL + explicit locking and deterministic flush semantics,
removing the root cause of parquet append corruption in tests while
keeping the original DataFrame-based analysis consumers unchanged
(get_records_df returns equivalent schemas).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-12-30 14:13:21 +08:00
zhuwenxing
0a2655dba0
test: fix chaos apply time (#31076)
* increase waiting time 
* still apply chaos even timeout

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2024-03-08 10:25:10 +08:00
zhuwenxing
1bad19a121
[test]Fix apply chaos condition (#27625)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2023-10-11 14:11:33 +08:00
zhuwenxing
68a2940b66
[test]Refine chaos apply (#26823)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2023-09-05 10:17:48 +08:00
zhuwenxing
b3de99e336
[test]Add method to analyze chaos test result (#26724)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2023-09-01 10:31:01 +08:00
zhuwenxing
717f712062
[test]Fix get collection for chaos test (#23484)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2023-04-18 16:06:34 +08:00
zhuwenxing
030d8fb206
[test]Add testcase for verification (#18715)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2022-08-19 12:54:54 +08:00
zhuwenxing
66f197a6f5
[test]Update chaos test for milvus deployed by operator (#18682)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2022-08-17 14:32:49 +08:00
zhuwenxing
4eaacf49f5
[skip e2e]Add bulk load checker for chaos test (#17101)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2022-05-20 09:31:57 +08:00
zhuwenxing
b745b6f707
[skip e2e]Add all pods kill chaos test (#15761)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2022-02-25 18:41:53 +08:00