100 Commits
Author SHA1 Message Date
b66f55fe67 fix: harden copy-segment restore pipeline against partial failures and transient errors (#51527)
issue: #51191

Fixes three robustness defects in the copy-segment restore pipeline
(`internal/datacoord/copy_segment_*.go`), each with a unit test covering
the failure mode.

### 1. `checkPendingJob` cannot resume a partially created job (high)

Task creation is a multi-step sequence (per-group `AllocID` + `AddTask`,
each persisted individually, then the `Pending → Executing` transition).
If any step fails mid-way (etcd hiccup, DataCoord restart), the job
stayed `Pending` with only a subset of tasks persisted, and the old
early-return `if len(tasks) > 0 { return }` fired on every subsequent
round — the restore hung until the job timeout with no way to progress.

Now the transition is resume-safe: it computes the source segments
already covered by persisted tasks, creates tasks only for the uncovered
mappings, and always (re-)applies the idempotent `Executing` transition
(so a round that persisted all tasks but failed the job update also
recovers).

### 2. Transient `QueryCopySegment` RPC error failed the whole restore
(medium)

A single network blip or DataNode restart during a status poll
permanently failed the task and its parent restore job. This was
inconsistent with the import pipeline, where a `QueryImport` RPC error
resets the task for retry instead of failing the job.

Now a query RPC error is logged and the task is kept `InProgress` for
re-query on the next tick. The job-level timeout still bounds a
permanently unreachable node; worker-reported task failures keep the
fail-fast behavior.

### 3. `copySegmentTask.Clone` mutated shared state before persisting
(medium)

`Clone` copied the `atomic.Pointer` value, not the protobuf, so the
"clone" used by `UpdateTask` shared the same `*datapb.CopySegmentTask`
as the cached entry. Update actions mutate the proto in place, so the
in-memory task was mutated *before* `SaveCopySegmentTask` — a failed
catalog save left the coordinator cache reflecting the new state while
etcd kept the old one. Now `Clone` deep-copies with `proto.Clone`,
matching `copySegmentJob.Clone`.

### Testing

- `TestCheckPendingJob_ResumesPartialTaskCreation`,
`TestCheckPendingJob_AllTasksExistTransitionsToExecuting`
- `TestQueryTaskOnWorker_RPCErrorKeepsTaskInProgress`
- `TestClone_DeepCopiesProto`,
`TestUpdateTask_SaveFailureLeavesCacheUnchanged`
- Full `./internal/datacoord/` package: PASS

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 22:18:42 +08:00
d6982c74c4 enhance: record and expose DataNode task cost_time / cost_cpu_num via QueryTask (#51443)
issue: #49156

## Summary

- Record `cost_time` / `cost_cpu_num` on DataNode index build tasks and
surface them through `QueryTask` response `Properties`.
- Reserve the unified `cost_time` / `cost_cpu_num` keys under
`pkg/taskcommon` so future PRs can wire up the other
`CreateTask`-dispatched task types.
- Introduce small `internal/datanode/taskcost` helper (`NowMs`,
`ElapsedMs`, `EstimateIndexBuildCPUNum`) for index build task cost
accounting.
- Final state/failReason and execution-end cost are written in a single
`TaskManager` critical section, and `QueryTask` reads them from a single
snapshot, so state and cost in one response are always consistent.

## Notes

This PR is producer-side only. DataCoord / proxy / metrics exporter do
not consume these properties yet; downstream consumption should land in
a follow-up linked from #49156.

`cost_cpu_num` is a coarse, statistics-only estimate for observability
(vector index ≈ knowhere build pool size = NumCPU in cluster mode;
scalar index = 1). It is not used for coordinator-side scheduling, so
the standalone pool-ratio deviation (NumCPU × buildIndexThreadPoolRatio)
and pool sharing across concurrent builds are intentionally not modeled.

Supersedes #49157 (that PR's head branch was rebased onto latest master
and force-pushed, so GitHub no longer allows reopening it). Content is
identical, rebased to a single commit on top of current master.

## Test plan

- [x] `go test ./taskcommon/...` from `pkg/`
- [x] `go test -tags dynamic,test -gcflags="all=-N -l" -count=1
./internal/datanode/taskcost`
- [ ] `go test -tags dynamic,test -gcflags="all=-N -l" -count=1
./internal/datanode/index -run
'TestIndexTaskSchedulerRecordsIndexTaskCost|Test_statsTaskInfoSuite/Test_IndexTaskCostMethods'`
- [ ] Manual sanity: `QueryTask` returns `cost_time` / `cost_cpu_num`
for DataNode index build task success and failure paths.

---------

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-17 17:38:40 +08:00
944b614a8c enhance: pick least-loaded DataNode in globalScheduler instead of first-fit (#50912)
## What

The datacoord `globalScheduler.pickNode` used **first-fit**: it returned
the first node in map-iteration order whose available slots could
satisfy the task. Because Go map iteration order is non-deterministic
and the search stops at the first fit, scheduled tasks (import /
compaction / index / stats) were not spread evenly across DataNodes — a
cluster could land most tasks on one pod while others stayed idle.

This PR maintains a per-round **max-heap** of nodes keyed by available
slots and always assigns each task to the **most-available
(least-loaded)** node (water-filling on available slots). The heap is
built once per `schedule()` round and reused across all picks, so later
picks observe the decremented slots.

The previous fallback (drain the most-available node when no node can
fully satisfy `taskSlot`) and the empty-cluster / no-slot behaviors are
**preserved**.

## Why

Related discussion:
https://github.com/milvus-io/milvus/discussions/50872 — bulk import on a
multi-DataNode cluster spent ~90% of wall-clock on a single pod. One
root cause is on the **scheduling layer**: first-fit selection did not
balance tasks across nodes. This PR addresses that layer.

> Note: the import-specific regrouping in `RegroupImportFiles` (which
can merge multiple files into a single task) is a separate,
complementary issue and is **not** addressed here.

## Test

- Reworked `TestGlobalScheduler_pickNode` (tie / least-loaded / fallback
/ single-node decrement / all-empty / empty-cluster).
- Added `TestGlobalScheduler_pickNode_Balancing`: 3 nodes × 100 slots,
30 tasks × 10 slots → each node receives exactly 10 and is drained to 0.
- `go vet` clean; full `internal/datacoord/task` package passes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

issue: #50914

---------

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 08:00:35 +08:00
9fe38b1f09 doc: add design document for online shard split of namespace collections (#50465)
Add the design document for online shard split of namespace
(multi-tenant) collections.

The design covers:
- Range routing over `big_endian(hash(namespace)) || namespace` with a
versioned routing table derived from the collection meta.
- Write switching via a `SplitShard` WAL fence message (`T_switch`) with
reject-and-refetch on the proxy; target vchannels are initialized with a
`BarrierTimeTick` so every message of the new WALs is strictly greater
than `T_switch`.
- In-place child delegators fronted by the source delegator during the
transition window (sealed segments stay single-loaded, deletes and
timeticks are forwarded back).
- Multi-round metadata-only relabel redistribution by DataCoord, with
the release-safety analysis (frozen targets, merged recovery view,
register-then-release).
- One-shot QueryCoord adoption with in-place delegator handoff,
consistency guarantees, engineering constraints, configuration, and
failure handling.

issue: #50463

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 07:38:35 +08:00
426b7f9260 enhance: build text index inline in mixcompaction (#50140)
issue: #50145

## Summary

Make `mixCompactionTask` build text indexes inline for `enable_match`
fields (mirroring `sortCompactionTask`) so that mix-compaction output
segments arrive at QueryNode already carrying `TextStatsLogs`. This
eliminates the CGO_LOAD `CreateTextIndex` fallback path in segcore —
observed in production to redundantly rebuild text indexes during
segment load for tens of seconds up to 13+ minutes per segment.

## Background

For a freshly mix-compacted segment with text-match fields, the load
pipeline currently races:

1. Vector index task completes within ~10s (event-triggered)
2. QueryCoord treats the segment as loadable once the vector index is
ready
3. The `TextIndexJob` (stats task) is event-less — only the 60s polling
ticker submits it
4. The job itself takes ~2 minutes for typical text-heavy segments
5. QueryNode receives the segment before its persistent text index is
written; segcore detects `text_stats_logs == nil` and calls
`CreateTextIndex` in-place at load time (`[CGO_LOAD]` scope)

`sortCompactionTask` already avoids this by building the text index
inline as part of compaction
(`internal/datanode/compactor/sort_compaction.go:469-503`).
`mixCompactionTask` did not — this PR closes the gap.

## What changes

- **`internal/datanode/compactor/mix_compactor.go`** — Add `cm
storage.ChunkManager` field; constructor takes one extra arg; add a thin
`createTextIndex` method wrapper that delegates to the existing
package-level `createTextIndex` helper (in `compactor_common.go`,
already used by sort compaction); after `applyLOBCompaction`, loop over
each non-empty **sorted** output segment, build text indexes, update the
V3 manifest, and assign `TextStatsLogs`. Emits a `create_text_index`
stage latency metric. (No new shared helper is introduced — this PR
reuses `compactor_common.go:createTextIndex` and `sort_compaction.go` is
untouched.)
- **`internal/datanode/compactor/namespace_compactor.go`** — Forward
`cm` to the inner `mixCompactionTask`.
- **`internal/datanode/services.go`** — Updated call sites (pass `cm`).
- **`internal/datacoord/compaction_task_mix.go`** — Extend the
`FileResources` plumbing condition to include `MixCompaction` so custom
analyzers (ref mode) reach the inline build. Previously only
`SortCompaction` got `FileResources`, which would have caused
mix-compacted text indexes to use default tokenization → silent search
regressions.
- **`internal/datacoord/compaction_task_clustering.go` /
`compaction_inspector.go`** — Namespace-enabled `ClusteringCompaction`
is routed on the DataNode to `NewNamespaceCompactor`, which delegates to
`mixCompactionTask.Compact()` and now builds the text index inline for
sorted-by-namespace outputs. Wire `IndexEngineVersionManager` into
`clusteringCompactionTask` and, in `BuildCompactionRequest()`, set
`CurrentScalarIndexVersion` (otherwise the inline text index metadata is
emitted with version 0) and fetch `FileResources` for namespace-enabled
clustering plans in ref mode (otherwise the custom analyzer resources
are not downloaded and the text index falls back to the default
analyzer). Addresses review feedback from @aoiasd.
- **`internal/datanode/compactor/mix_compactor_test.go` /
`namespace_compactor_test.go`** — Updated existing constructor call
sites to pass the new `cm` arg.
- **`internal/datanode/compactor/mix_compactor_text_index_test.go`
(new)** — Mockey-based unit tests covering: the wrapper's identifier
propagation to the package helper, error propagation, and real
`Compact()` inline-loop semantics (empty + unsorted segments skipped,
`TextStatsLogs` assigned for sorted, V3 manifest rewritten,
build/manifest errors abort).
- **`internal/datacoord/compaction_task_mix_test.go`** — Test that
`MixCompaction` plans receive `FileResources` in ref mode.

## Test plan

- [x] `go test -tags dynamic,test -gcflags="all=-N -l" -count=1 -run
"TestMixCompaction|TestNamespace|TestSort"
./internal/datanode/compactor/...` — PASS (post-rebase)
- [x] `go test -tags dynamic,test -gcflags="all=-N -l" -count=1 -run
"TestMixCompaction|TestCompactionTask" ./internal/datacoord/...` — PASS
- [x] New unit tests pass:
`TestMixCompaction_createTextIndex_Delegates`,
`TestMixCompaction_createTextIndex_PropagatesError`,
`TestMixCompaction_Compact_InlineTextIndex`,
`TestMixCompaction_Compact_InlineTextIndex_BuildError`,
`TestMixCompaction_Compact_InlineTextIndex_ManifestError`, and
(datacoord)
`TestMixCompactionTaskSuite/TestBuildCompactionRequest_MixFileResourcesInRefMode`,
`TestClusteringCompactionTaskSuite/TestBuildCompactionRequest_NamespaceFileResourcesInRefMode`
- [ ] CI builds against fresh C++ artifacts (local worktree build was
skipped because the C++ shared libs in this workspace are stale relative
to upstream's recent cgo changes — unrelated to this PR's diff)
- [ ] Manual / integration: verify a freshly mix-compacted segment with
text-match fields lands on QueryNode with non-empty `text_stats_logs`
and does NOT trigger the `[CGO_LOAD] CreateTextIndex` slow path in
QueryNode logs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 17:14:26 +08:00
f11eef1df2 fix: guard growing segment field maps against concurrent rehash (#50395)
issue: #50377

## Problem

Standalone crashes with SIGSEGV (exit 139) when an `ST_WITHIN` query
runs on a nullable GEOMETRY field of a **growing** segment concurrently
with schema-evolution (add field).

The reported stack:
```
GISFunctionFilterExpr.cpp -> segment_->bulk_subscript(...)
SegmentGrowingImpl.cpp    -> insert_record_.get_valid_data(field_id)
/usr/include/c++/12/bits/unordered_map.h:880   (SIGSEGV)
```

## Root cause

`InsertRecordGrowing` keeps the per-field columns in two plain
`std::unordered_map`s (`data_` / `valid_data_`).

- The query path (`SegmentGrowingImpl::bulk_subscript` → `get_data_base`
/ `get_valid_data`, and every other growing-segment reader that funnels
through them) reads these maps **without any lock**.
- Schema evolution (`Reopen` → `fill_empty_field` → `append_field_meta`
→ `append_data` / `append_valid_data`) `emplace`s into the maps, which
can **rehash** the bucket array.
- A rehash concurrent with a lock-free `find()` / `at()` on a query
thread walks freed bucket memory → SIGSEGV. The GIS `ST_WITHIN` path
just happens to be a frequent reader (`bulk_subscript`).

Only `Insert` (shared) and `Reopen` (unique) took `sch_mutex_`; the
query path took nothing, so nothing serialized a reader against the
rehash.

## Fix

Add a dedicated `field_map_mutex_` to `InsertRecordGrowing`:
- structural writers (`append_*`, `drop_field_data`, `clear`) take it
**unique**;
- lookups (`get_data_base`, `get_valid_data`, `is_data_exist`,
`is_valid_data_exist`) take it **shared**.

The `append_data` paths resolve their reader-dependent values before
taking the unique lock to avoid recursive locking on the non-recursive
`shared_mutex`. The mutex is kept separate from the existing
`shared_mutex_` (which serializes pk inserts) so the hot read path does
not contend with inserts. Because all growing-segment readers funnel
through these accessors, this covers `bulk_subscript`, vector search and
expression chunk reads uniformly.

## Test

`internal/core/unittest/test_growing_concurrent_reopen.cpp` races
single-offset `bulk_subscript` readers against `Reopen`-driven field
additions. It reliably fails before the fix (failed map lookup under
debug/ASan; SIGSEGV in Release) and passes after.

---------

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 06:34:28 +08:00
2f9df0a75b fix: external collection query_iterator fails with fieldID(1) not found (#50203)
## Issue

issue: #50188

## Problem

For external collections, `query_iterator` returns hundreds of thousands
of rows and then fails with `MilvusException: (code=65535,
message=fieldID(1) not found)`. Rebuilding the iterator from the last
primary-key cursor reproduces the error immediately and
deterministically.

## Root Cause

The proxy unconditionally appends the reserved system Timestamp field
(`common.TimeStampField`, fieldID=1) to `OutputFieldsId` for the
iterator MVCC dedup (`internal/proxy/task_query.go:610`).

On the QueryNode side, `FillRetrieveResultIfEmpty` is invoked when a
query produces a **fully empty** result. It iterates `OutputFieldsId`
and resolves each field id through the collection `SchemaHelper` to
synthesize empty columns. System fields are never part of the
user/collection schema, so for external collections (whose schema
contains no system fields, and whose segcore synthesizes the timestamp
as a constant Int64 column via `SynthesizeExternalSystemFields` /
`init_timestamps_constant`) the lookup `GetFieldFromID(1)` fails with
`fieldID(1) not found`.

This surfaces when the iterator paginates past the last matching row so
the next batch matches zero rows, and reproduces deterministically when
the iterator is rebuilt from the last cursor (the query is again empty,
hence the ~20ms fail-fast).

Internal collections do not hit this because segcore returns
empty-but-present field columns for zero-match queries, bypassing the
empty-fill path; the underlying bug is that the Go empty-fill path does
not special-case system fields the way the C++ retrieve path does.

## Fix

Special-case reserved system fields (RowID / Timestamp) in
`FillRetrieveResultIfEmpty` and emit them as empty Int64 columns —
matching the non-empty retrieve path (segcore emits system fields as
Int64) — instead of resolving them through the schema. The proxy already
strips system fields via `filterSystemFields`, so the user-facing result
is unchanged.

## Test

- Added table-driven cases to `TestFillIfEmpty` covering an
external-collection schema (no system fields) with `OutputFieldsId`
carrying `TimeStampField`, and a RowID+Timestamp case. Both assert no
error and that empty Int64 columns are emitted.
- Changed code covered at 100%.
- `go test -tags dynamic,test -gcflags="all=-N -l"
./internal/util/typeutil/` passes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 16:38:17 +08:00
4fa49058c1 enhance: extend arrow IO thread pool config to DataNode init (#50099)
issue: #50098

## Summary

- Apply `common.arrow.ioThreadPoolCoefficient` /
`ioThreadPoolMaxCapacity` to DataNode at startup, mirroring the
QueryNode wiring from #49208/#49623. Without this, the paramtable keys
exist but have no effect on DataNode and the Arrow IO pool stays at
Arrow's hard-coded default of 8.
- Also call `initcore.InitArrowReaderConfig` so the parquet reader
range-coalescing limits (`hole`/`range` size) apply.
- Register paramtable watchers so capacity changes hot-reload without
restart, matching QueryNode behavior.
- Raise `dataCoord.import.fileNumPerSlot` default from 1 to 4 to reduce
per-import slot demand by 4x and leave more arrow IO pool headroom for
concurrent compactions on the same worker.

## Why

See #50098 for the full reproducer and analysis. Briefly: production
observed a 1.5M-row sort compaction taking >1 hour while the worker's
CPU sat at 12% and network at 14% of baseline — all 5 large
SortCompactions on different pods finished at nearly identical wall
times (variance < 1%), the classic shared-pool saturation signature.
Local bench at 50ms RTT with 100 concurrent readers:

| ARROW_IO_THREADS | conc=100 wall_ms | per-task p50_ms |
|---|---|---|
| 8 (default) | 36,917 | 35,908 |
| 32 | 18,174 | 16,074 |
| 64 | 17,320 | 15,702 |

## Test plan

- [x] `go test -count=1 -run TestComponentParam ./util/paramtable/` (pkg
module)
- [x] `go test -tags dynamic,test -gcflags="all=-N -l" -count=1 -run
TestRegisterArrowIOThreadPoolWatchers ./internal/datanode/index/`
- [x] `go test -tags dynamic,test -gcflags="all=-N -l" -count=1 -run
"TestImport" ./internal/datacoord/`
- [ ] CI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 17:08:16 +08:00
b6a7af098e enhance: Optimize dropped segment index GC (#49728)
Related to #49585

## What changed

This PR refactors DataCoord GC scheduling and moves dropped segment
index cleanup into the dropped segment recycle path.

- Split the previous serial `meta` GC loop into independent GC tasks so
dropped segment recycling no longer blocks index, segment-index,
analyze, JSON/text stats, snapshot, orphan, or LOB cleanup work.
- Broadcast GC pause commands to all pausable GC tasks instead of only
the old `meta` worker.
- Recycle dropped segments concurrently, while preserving the
per-segment cleanup order.
- When recycling a dropped segment, delete segment object files and
segment index files first, then remove segment-index meta, and finally
remove segment meta.
- Keep orphan index file/meta GC as a fallback for old data and partial
failure recovery.
- Add `GetAllSegmentIndexes` so dropped segment GC can clean
segment-index meta even when the field index has already been marked
deleted and would be filtered by `GetSegmentIndexes`.

## Failure and safety behavior

- If object file deletion fails, segment-index meta and segment meta are
kept for retry.
- If segment-index meta deletion fails, segment meta is kept for retry.
- Snapshot protection is checked for both segment IDs and index build
IDs before deleting files or metadata.
- V3 segment data still uses `RemoveWithPrefix` for the manifest base
path, and index files are removed from recorded segment-index file keys.

## Tests

Added coverage for:

- GC task registry and pause worker fan-out.
- Dropped segment concurrent worker signaling.
- Dropped segment cleanup of binlog plus segment-index files/meta.
- Deleted field-index filtering case, where `GetSegmentIndexes` returns
empty but dropped segment GC still finds segment-index meta.
- File deletion failure, segment-index meta deletion failure, and
segment meta deletion failure retry behavior.
- Snapshot-blocked index build IDs.
- V3 dropped segment file deletion success and failure paths.
- `GetAllSegmentIndexes` nil/clone behavior.

Local verification:

- `gofmt`
- `git diff --check`

I also attempted targeted `go test -tags dynamic,test
./internal/datacoord ... -coverprofile=...`, but this local workspace
has a stale C++ core output mismatch and fails at link time with
`undefined reference to loon_properties_inject_external_spec`. CI should
run against a matching core build.

---------

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 06:06:17 +08:00
c52c7d67c5 enhance: propagate collection_id in datacoord task properties (#49125)
issue: #49136

## Summary

Add `collection_id` to the `Properties` map of every task that
datacoord's `Cluster.createTask` dispatches to datanode (Compaction,
PreImport, Import, Index, Stats, Analyze, ExternalCollection,
CopySegment). This is groundwork for worker-side attribution and
telemetry without decoding every task payload; this PR only propagates
the wire field and does not add the datanode-side consumer yet.

## What changed

- Add `CollectionIDKey`, `AppendCollectionID`, `GetCollectionID` helpers
in `pkg/taskcommon.Properties`.
- `GetCollectionID` returns `(int64, error)` so future consumers can
distinguish a missing / invalid property from an explicit `0` value.
- For requests whose proto already exposes `CollectionID` —
`PreImportRequest`, `ImportRequest`, `CreateJobRequest`,
`CreateStatsRequest`, `AnalyzeRequest`,
`UpdateExternalCollectionRequest` — read it directly from the request.
- `CompactionPlan` and `CopySegmentRequest` have no top-level
`CollectionID` field, so `CreateCompaction` / `CreateCopySegment` now
take an explicit `collectionID int64` argument (consistent with the
existing `taskSlot` parameter of `CreatePreImport` / `CreateImport`).
Callers pass `t.GetTaskProto().GetCollectionID()` /
`t.GetCollectionId()`, which are already tracked in task metadata.
- Update `MockCluster`, existing callers and existing tests accordingly.
- Add a dedicated unit test `TestCluster_CreateProperties_CollectionID`
asserting that `collection_id` is carried in the
`CreateTaskRequest.Properties` for all eight task types, plus round-trip
tests for the new properties helpers.

## Follow-up

- Add the datanode-side consumer for `collection_id` once the
worker-side attribution / telemetry path lands.
- Consider adding top-level `collection_id` fields to `CompactionPlan`
and `CopySegmentRequest` so all `Create*` paths can read collection IDs
directly from their request protos.

## Test plan

- [x] `go test ./taskcommon/...` from `pkg/` —
`TestProperties_CollectionID` and pre-existing tests pass.
- [x] `go test -tags=test ./internal/datacoord/session/...` — previously
passed for `TestCluster_CreateProperties`,
`TestCluster_CreateProperties_CollectionID`,
`TestCluster_{Compaction,Import,Index,Stats,Analyze,CopySegment}`.
- [x] `go test -tags=test -run
"TestL0CompactionTask|TestClusteringCompactionTask|TestMixCompactionTask|TestCopySegment"
./internal/datacoord/` — affected compaction / copy-segment suites pass.
- [x] `go build ./internal/datacoord/...` — clean build.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 06:30:32 +08:00
73eec01a0c fix: disable SDK default checksum to fix non-AWS S3 uploads (#49978)
issue: #49977

## Summary

AWS SDK C++ 1.11.692 (bumped from 1.11.352 in #47810) changed two
defaults that together break PutObject against non-AWS S3-compatible
storage:

1. `PutObjectRequest::GetChecksumAlgorithmName()` returns `"crc64nvme"`
by default
2. `ClientConfiguration::checksumConfig::requestChecksumCalculation`
defaults to `WHEN_SUPPORTED`

`ChecksumInterceptor` then attaches a request hash to every PutObject,
and the V4 signer switches the request to `Transfer-Encoding:
aws-chunked` + `x-amz-content-sha256:
STREAMING-UNSIGNED-PAYLOAD-TRAILER`. Aliyun OSS, Tencent COS, Huawei
OBS, and GCP all reject this streaming form.

This makes any `MinioChunkManager::PutObjectBuffer` call fail in an
infinite `JobStateRetry` loop — json_stats / bson_inverted
shared_key_index builds and any non-DiskANN-style index upload (IVF_*,
HNSW, FLAT) are affected.

## Fix

Restrict `requestChecksumCalculation` to `WHEN_REQUIRED` on non-AWS
providers so the SDK only adds checksums when the operation model
demands them (PutObject does not). Same approach as
milvus-io/milvus-storage#500.

Patched in both client construction paths:
- `MinioChunkManager::MinioChunkManager` (storage_type=minio,
address-based dispatch) — gated on `storageType != S3`
- `ChunkManager.cpp` subclasses (storage_type=remote,
cloud_provider-based dispatch) — applies in `GcpChunkManager`,
`AliyunChunkManager`, `TencentCloudChunkManager`,
`HuaweiCloudChunkManager`. `AwsChunkManager` keeps the default
`WHEN_SUPPORTED`.

CARDINAL_TIERED / DiskANN indexes already work because they upload via
Arrow's `S3FileSystem` provided by milvus-storage, which was fixed in
#500.

## Test plan

- [x] Added `TEST(MinioChecksumConfig, OverridesAreWhenRequired)` in
`test_storage.cpp` — asserts the override flips both directions from
`WHEN_SUPPORTED` to `WHEN_REQUIRED`
- [ ] Build / CI green
- [ ] Manual smoke test on Aliyun OSS endpoint — index build (IVF_SQ8)
and json_stats no longer fail with `x-oss-ec=0017-00000804`. CI cannot
regression-detect this since MinIO doesn't reject `aws-chunked`; a real
Aliyun OSS endpoint is required.

## Workaround (no code change)

Setting `AWS_REQUEST_CHECKSUM_CALCULATION=when_required` and
`AWS_RESPONSE_CHECKSUM_VALIDATION=when_required` on milvus pods also
fixes this — the AWS SDK reads them at `ClientConfiguration`
default-construct time, so it works across all bundled SDK copies
without rebuilding. Useful for hotfix on running clusters until this PR
ships.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 05:34:32 +08:00
cai.zhangandGitHub ddf1cae39e fix: Upgrade arrow-go to v17.0.1 (#48775)
issue: #48375

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-04-08 17:15:39 +08:00
eeb26e8c1c fix: vector clustering key compaction task stuck in analyzing state (#48529)
## Summary
- Map `analyzing` state to `InProgress` in `FromCompactionState` so the
global scheduler keeps the task in `runningTasks` instead of dropping it
- Guard `QueryTaskOnWorker` to skip DataNode queries while the task is
in `analyzing` state, preventing premature state reset

## Root cause
When FloatVector is used as a clustering key, `CreateTaskOnWorker` calls
`doAnalyze()` which sets the task state to `analyzing`. However,
`FromCompactionState` did not map `analyzing` to any scheduler state,
returning `None`. This caused the global scheduler to drop the task from
both `pendingTasks` and `runningTasks`. After `processAnalyzing()`
transitioned the state back to `pipelining`, no one re-scheduled
`doCompact()`, leaving the task stuck forever.

## Test plan
- [x] `TestFromCompactionState` — verifies all compaction states map
correctly, including `analyzing → InProgress`
- [x] `TestQueryTaskOnWorkerSkipAnalyzing` — verifies
`QueryTaskOnWorker` returns immediately when task is in `analyzing`
state without querying DataNode

issue: #47540

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 13:53:37 +08:00
35366872d1 fix: add nil guard for GoRegistry and CRegistry in MilvusRegistry.Gather (#48414)
## Summary

Fix nil pointer dereference in `MilvusRegistry.Gather()` that occurs
during QueryTask after etcd chaos recovery, caused by CGo memory
corruption overwriting the `GoRegistry` pointer to nil.

- Add nil guard for `GoRegistry` before calling `GoRegistry.Gather()` —
if nil, return `(nil, nil)` instead of panicking
- Add nil guard for `CRegistry` before calling `CRegistry.Gather()` — if
nil, return Go metrics only
- Change error return from uninitialized `res` variable to explicit
`nil` for clarity

issue: #48383

## Test plan

- [x] `TestMilvusRegistryGather_NilGoRegistry` — verifies no panic when
both `GoRegistry` and `CRegistry` are nil
- [x] `TestMilvusRegistryGather_NilCRegistry` — verifies Go metrics are
returned correctly when only `CRegistry` is nil

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 13:51:43 +08:00
44a6979742 fix: propagate EntityTtlPhysicalTime in search request shallow copy (#48376)
## Summary
- `shallowCopySearchRequest` omits `EntityTtlPhysicalTime` when
distributing search requests to worker nodes
- The fallback computes physical time from `MvccTimestamp`, which may
lag behind when `speedupGuranteeTS` reduces the guarantee timestamp
(e.g. no writes after flush with local WAL)
- This causes entity-level TTL filtering to use a stale timestamp,
allowing expired entities to appear in search results
- Add `EntityTtlPhysicalTime` to both `shallowCopySearchRequest` and the
advanced search request construction path

issue: #48260

## Test plan
- [x] Unit test added:
`TestShallowCopySearchRequest_EntityTtlPhysicalTime`
- [ ] Existing entity TTL e2e tests pass
(`test_search_without_filter_expired_entity_data`)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 02:03:36 +08:00
cai.zhangandGitHub 311fcea794 fix: allow nullable JSON field without binlog when creating json key index (#48651)
issue: #48650

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-04-04 01:59:36 +08:00
fc4982bd62 fix: prevent node panic when unsupported types used as ClusteringKey (#48184)
## Summary

Fixes #47540

- **Bug 1 (MixCoord panic):** `compactionInspector.analyzeScheduler` was
never initialized in production code. When FloatVector is used as
ClusteringKey, the `doAnalyze()` path calls `analyzeScheduler.Enqueue()`
on a nil pointer → panic. Fixed by passing `analyzeScheduler` to
`newCompactionInspector`.
- **Bug 2 (DataNode round-robin panic):** `validateClusteringKey()` had
no field type whitelist, so JSON/Bool/Array passed schema validation.
During clustering compaction, `NewScalarFieldValue()` panics on
unsupported types. Fixed by adding `IsClusteringKeyType()` check to
reject unsupported types at collection creation time.

## Test plan

- [x] `TestIsClusteringKeyType` — verifies supported/unsupported type
classification
- [x] `TestClusteringKey` — new sub-tests for JSON, Bool, Array as
ClusteringKey (all rejected)
- [ ] Existing `TestClusteringKey` sub-tests (normal, multiple keys,
vector key) still pass
- [ ] `TestCompactionPlanHandler*` tests pass with updated
`newCompactionInspector` signature

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 21:21:25 +08:00
0715859e8a fix: pickNode should deduct task slots instead of zeroing available slots (#48170)
## Summary
- **Bug**: `pickNode` always set `AvailableSlots=0` for the selected
node, limiting the scheduler to at most one task per node per scheduling
cycle regardless of actual capacity
- **Fix**: Deduct only the required slot count (`AvailableSlots -=
taskSlot`) when a node has sufficient capacity; zero-out only as a
fallback when no node has enough slots
- **Tests**: Updated `TestGlobalScheduler_pickNode` to verify proper
slot deduction across multiple consecutive picks and fallback behavior

issue: #48169

## Test plan
- [x] Updated `TestGlobalScheduler_pickNode` to cover:
- Normal pick: verifies `AvailableSlots` decremented by `taskSlot` (not
zeroed)
- Multiple consecutive picks from same node: verifies cumulative
deduction
- Fallback path: when `taskSlot > AvailableSlots`, picks max-available
node and zeros it
  - No available slots: returns `NullNodeID`
- [ ] CI: ut-go passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 21:17:25 +08:00
31cc8280f1 fix: Use AlwaysTrueExpr instead of ValueExpr in combineOrInWithNotEqual (#48113)
combineOrInWithNotEqual used `newBoolConstExpr(true) (a ValueExpr)` when
detecting tautologies like `(a IN S) OR (a != d) where d ∈ S`. This
ValueExpr was not recognized by foldBinary's `IsAlwaysTrueExpr` check,
causing it to pass through to the C++ execution engine. The C++ side
compiled it into `PhyValueExpr` which returns a ConstantVector<bool>,
but FilterBitsNode expects a ColumnVector, resulting in an assertion
error.

Fix by using `newAlwaysTrueExpr()` so the expression is properly
recognized and handled throughout the pipeline.

issue: #47997

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 21:15:29 +08:00
cai.zhangandGitHub 866870339a fix: bump milvus-storage commit to fix azure buffered output stream (#48040)
issue: #48039

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-03-06 15:19:20 +08:00
b7abb534fe fix: search without filter returns expired data when entity TTL is enabled (#47980)
When a collection has ttl_field configured, search() without a filter
expression still returns expired entities. This is because entity-level
TTL filtering is injected in CompileExpressions, which is only called
when a FilterBitsNode exists in the plan. Search without filter builds
the plan as MvccNode -> VectorSearchNode with no FilterBitsNode, so TTL
filtering is completely skipped.

Add an AlwaysTrueExpr FilterBitsNode when no user filter is present but
entity-level TTL is enabled, so CompileExpressions is invoked and merges
the TTL filter expression at execution time.

issue: #47977

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:17:20 +08:00
cai.zhangandGitHub 40b5a43689 enhance: Add phase-level timing logs and metrics for sort compaction (#47673)
issue: #47671

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-03-02 10:01:20 +08:00
cai.zhangandGitHub 331b277368 fix: Use physical time for entity-level TTL filtering (#47518)
## Problem
In strong consistency mode, when query_timestamp is significantly older
than current physical time (e.g., replaying old data with
guaranteeTimestamp from the past), entity-level TTL filtering
incorrectly used query_timestamp instead of current physical time. This
caused:
- Valid data to be incorrectly filtered as "expired"
- Zero search/query results even when data should be visible

## Root Cause
The TTL filter expression (`ttl_field > physical_us OR ttl_field IS
NULL`) was using physical time derived from query_timestamp, which could
be hours or days old in strong consistency scenarios. Entity TTL should
always use current physical time, not query timestamp.

## Solution
1. **C++ Core Changes**:
- Add `physical_time_us_` parameter to QueryContext (defaults to
query_timestamp)
   - Pass physical_time_us through Search/Retrieve API chain:
* QueryContext constructor → Search/Retrieve C API → segment
implementation
- CreateTTLFieldFilterExpression now uses
QueryContext::get_physical_time_us()
   - Add ExecuteQueryExpr overload with physical_time_us for testing

2. **Go Layer Changes**:
   - Extract physical time from guaranteeTimestamp in query tasks:
     * query_task.go: Search operations
     * query_stream_task.go: Streaming search operations
- Use tsoutil.ParseHybridTs() to convert TSO timestamp to physical time
- Pass physical_time_us to C++ Search/Retrieve calls via
plan.go/segment.go

3. **Testing**:
   - EntityTTLTest.cpp: Core TTL filtering with physical_time_us
- EntityTTLEdgeCaseTest.cpp: Edge cases (no TTL field, zero
physical_time_us)
   - Tests verify QueryContext stores/returns physical_time_us correctly
- Tests validate TTL filtering uses physical_time_us, not
query_timestamp

## Behavior
- **Before**: TTL filter used query_timestamp (old in strong
consistency)
- **After**: TTL filter uses current physical time (from
guaranteeTimestamp)
- **Backward compatible**: When physical_time_us=0, falls back to
query_timestamp

## Technical Details
- TSO timestamp conversion: `tsoutil.ParseHybridTs(timestamp)` →
physical_ms
- Physical time in microseconds: `physical_us = physical_ms * 1000`
- TTL expression unchanged: `ttl_field > physical_us OR ttl_field IS
NULL`

Fixes #47413

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-02-27 19:01:20 +08:00
cai.zhangandGitHub 3425f533db fix: prevent server crash on division/modulo by zero in filter expressions (#47302)
issue: #47285 

Fix critical DoS vulnerability where filter expressions containing
division or modulo by zero operations cause Milvus server to crash with
SIGFPE .
Any client with query access could crash the server remotely using
expressions like `"int_field / {d} == 1", params:{"d": 0}`.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-01-28 11:33:32 +08:00
cai.zhangandGitHub e092884822 fix: add authentication to metrics endpoint when authorization enabled (#47277)
issue: #46817

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-01-25 21:39:31 +08:00
cai.zhangandGitHub 93735186fb fix: Avoid double counting index memory in segment loading estimation (#47045)
issue: #47044

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-01-14 20:57:27 +08:00
cai.zhangandGitHub 209ba4ad35 fix: Ensure all futures complete on exception to prevent use-after-free crash (#46959)
issue: #46958

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-01-13 18:05:27 +08:00
cai.zhangandGitHub ff96c5e9f7 fix: Fix GetCredentialInfo not caching RPC response (#46944)
issue: #46941

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-01-13 10:45:26 +08:00
cai.zhangandGitHub 0c200ff781 enhance:Limit the number of concurrent vector index builds per worker (#46773)
issue: #46772

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-01-07 15:47:25 +08:00
cai.zhangandGitHub f46ab9cea1 fix: Align the options of WKT/WKB conversions to ensure consistent behavior (#46828)
issue: #46823

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-01-07 12:31:24 +08:00
cai.zhangandGitHub 63026e6791 fix: Fill shardClientMgr field for queryTask to prevent panic (#46837)
issue: #46836

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-01-06 23:07:24 +08:00
cai.zhangandGitHub a16d04f5d1 feat: Support ttl field for entity level expiration (#46342)
issue: #46033

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Pull Request Summary: Entity-Level TTL Field Support

### Core Invariant and Design
This PR introduces **per-entity TTL (time-to-live) expiration** via a
dedicated TIMESTAMPTZ field as a fine-grained alternative to
collection-level TTL. The key invariant is **mutual exclusivity**:
collection-level TTL and entity-level TTL field cannot coexist on the
same collection. Validation is enforced at the proxy layer during
collection creation/alteration (`validateTTL()` prevents both being set
simultaneously).

### What Is Removed and Why
- **Global `EntityExpirationTTL` parameter** removed from config
(`configs/milvus.yaml`, `pkg/util/paramtable/component_param.go`). This
was the only mechanism for collection-level expiration. The removal is
safe because:
- The collection-level TTL path (`isEntityExpired(ts)` check) remains
intact in the codebase for backward compatibility
- TTL field check (`isEntityExpiredByTTLField()`) is a secondary path
invoked only when a TTL field is configured
- Existing deployments using collection TTL can continue without
modification
  
The global parameter was removed specifically because entity-level TTL
makes per-entity control redundant with a collection-wide setting, and
the PR chooses one mechanism per collection rather than layering both.

### No Data Loss or Behavior Regression
**TTL filtering logic is additive and safe:**
1. **Collection-level TTL unaffected**: The `isEntityExpired(ts)` check
still applies when no TTL field is configured; callers of
`EntityFilter.Filtered()` pass `-1` as the TTL expiration timestamp when
no field exists, causing `isEntityExpiredByTTLField()` to return false
immediately
2. **Null/invalid TTL values treated safely**: Rows with null TTL or TTL
≤ 0 are marked as "never expire" (using sentinel value `int64(^uint64(0)
>> 1)`) and are preserved across compactions; percentile calculations
only include positive TTL values
3. **Query-time filtering automatic**: TTL filtering is transparently
added to expression compilation via `AddTTLFieldFilterExpressions()`,
which appends `(ttl_field IS NULL OR ttl_field > current_time)` to the
filter pipeline. Entities with null TTL always pass the filter
4. **Compaction triggering granular**: Percentile-based expiration (20%,
40%, 60%, 80%, 100%) allows configurable compaction thresholds via
`SingleCompactionRatioThreshold`, preventing premature data deletion

### Capability Added: Per-Entity Expiration with Data Distribution
Awareness
Users can now specify a TIMESTAMPTZ collection property `ttl_field`
naming a schema field. During data writes, TTL values are collected per
segment and percentile quantiles (5-value array) are computed and stored
in segment metadata. At query time, the TTL field is automatically
filtered. At compaction time, segment-level percentiles drive
expiration-based compaction decisions, enabling intelligent compaction
of segments where a configurable fraction of data has expired (e.g.,
compact when 40% of rows are expired, controlled by threshold ratio).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2026-01-05 10:27:24 +08:00
cai.zhangandGitHub b13aac5164 fix: Include fieldID in raw data cleanup to prevent delete other fields (#46688)
issue: #46687 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
- Core invariant: raw-data cleanup must be scoped to (segment_id,
field_id) so deleting temporary raw files for one field never removes
raw files for other fields in the same segment (prevents cross-field
deletion during index builds).
- Root cause and fix (bug): VectorDiskIndex::Build() and
BuildWithDataset() called RemoveDir on the segment-level path; this
removed rawdata/{segment_id}/. The fix changes both calls to remove
storage::GenFieldRawDataPathPrefix(local_chunk_manager, segment_id,
field_id) instead, limiting cleanup to rawdata/{segment_id}_{field_id}/
(field-scoped).
- Logic removed/simplified: the old helper GetSegmentRawDataPathPrefix
was removed and callers were switched to GenFieldRawDataPathPrefix;
cleanup logic is simplified from segment-level to field-level path
generation and removal, eliminating redundant broad deletions.
- Why this does NOT cause data loss or regress behavior: the change
narrows RemoveDir() to the exact field path used when caching raw data
and offsets earlier in Build (offsets_path and CacheRawDataToDisk
produce field-scoped local paths). Build still writes/reads offsets and
raw data from GenFieldRawDataPathPrefix(...) and then removes that same
prefix after successful index.Build(); therefore only temporary files
for the built field are deleted and other fields’ raw files under the
same segment are preserved. This fixes issue #46687 by preventing
accidental deletion of other fields’ raw data.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-30 21:13:21 +08:00
cai.zhangandGitHub 8d12bfb436 fix: Restore the compaction task correctly to ensure it can be properly cleaned up (#46577)
issue: #46576 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
- Core invariant: During meta load, only tasks that are truly
terminal-cleaned (states cleaned or unknown) should be dropped; all
other non-terminal tasks (including timeout and completed) must be
restored so the inspector can reattach them to executing/cleaning queues
and finish their cleanup lifecycle.
- Removed/simplified logic: loadMeta no longer uses the broad
isCompactionTaskFinished predicate (which treated timeout, completed,
cleaned, unknown as terminal). It now uses the new
isCompactionTaskCleaned predicate that only treats cleaned/unknown as
terminal. This removes the redundant exclusion of timeout/completed
tasks and simplifies the guard to drop only cleaned/unknown tasks.
- Bug fix (root cause & exact change): Fixes issue #46576 — the previous
isCompactionTaskFinished caused timeout/completed tasks to be skipped
during meta load and thus not passed into restoreTask(). The PR adds
isCompactionTaskCleaned and replaces the finished check so timeout and
completed tasks are included in restoreTask() and re-attached to the
inspector’s existing executing/cleaning queues.
- No data loss or regression: Tasks in cleaned/unknown remain dropped
(isCompactionTaskCleaned still returns true for cleaned/unknown).
Non-terminal timeout/completed tasks now follow the same restoreTask()
control path used previously for restored tasks — they are enqueued into
the inspector’s queue/executing/cleaning flows rather than being
discarded. No exported signatures changed and all restored tasks flow
into existing handlers, avoiding behavior regression or data loss.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-26 18:57:19 +08:00
b2fa3dd0ae fix: Disable VCS to allow pkg tests to run (#46501)
### **Description**
- Add `-buildvcs=false` flag to Go test commands in coverage script

- Increase default session TTL from 10s to 15s

- Update SessionTTL parameter default value from 30 to 15


Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: bigsheeper <yihao.dai@zilliz.com>
Co-authored-by: chyezh <chyezh@outlook.com>
Co-authored-by: czs007 <zhenshan.cao@zilliz.com>
2025-12-25 14:31:19 +08:00
cai.zhangandGitHub 7fca6e759f enhance: Execute text indexes for multiple fields concurrently (#46279)
issue: #46274 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Performance Improvements**
* Field-level text index creation and JSON-key statistics now run
concurrently, reducing overall indexing time and speeding task
completion.

* **Observability Enhancements**
* Per-task and per-field logging expanded with richer context and
per-phase elapsed-time reporting for improved monitoring and
diagnostics.

* **Refactor**
* Node slot handling simplified to compute slot counts on demand instead
of storing them.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-23 21:05:18 +08:00
cai.zhangandGitHub 0943713481 fix: Skip Finished tasks when recovery with compatibility (#46515)
### **User description**
issue: #46466


___

### **PR Type**
Bug fix


___

### **Description**
- Extract finished task state check into reusable helper function

- Skip finished tasks during compaction recovery to prevent reprocessing

- Add backward compatibility check for pre-allocated segment IDs


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Compaction Task States"] -->|"Check with helper"| B["isCompactionTaskFinished()"]
  B -->|"Used in"| C["compactionInspector.loadMeta()"]
  B -->|"Used in"| D["compactionTaskMeta.reloadFromKV()"]
  C -->|"Skip finished tasks"| E["Recovery Process"]
  D -->|"Backward compatibility"| E
```



<details><summary><h3>File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>compaction_util.go</strong><dd><code>Add
isCompactionTaskFinished helper function</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

internal/datacoord/compaction_util.go

<ul><li>Added new helper function
<code>isCompactionTaskFinished()</code> to check if a <br>compaction
task is in a terminal state<br> <li> Function checks for failed,
timeout, completed, cleaned, or unknown <br>states<br> <li> Centralizes
task state validation logic for reuse across multiple
<br>components</ul>


</details>


  </td>
<td><a
href="https://github.com/milvus-io/milvus/pull/46515/files#diff-8f2cb8d0fef37617202c5a2290ad2bdbf2df5b5983604b5b505bc73a65c7eb43">+8/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Bug fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>compaction_inspector.go</strong><dd><code>Refactor to
use finished task helper function</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

internal/datacoord/compaction_inspector.go

<ul><li>Replaced inline state checks with call to
<code>isCompactionTaskFinished()</code> <br>helper<br> <li> Simplifies
code by removing repetitive state comparison logic<br> <li> Maintains
same behavior of skipping finished tasks during recovery</ul>


</details>


  </td>
<td><a
href="https://github.com/milvus-io/milvus/pull/46515/files#diff-1c884001f2e84de177fea22b584f3de70a6e73695dbffa34031be9890d17da6d">+1/-5</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>compaction_task_meta.go</strong><dd><code>Add finished
task check for backward compatibility</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

internal/datacoord/compaction_task_meta.go

<ul><li>Added check to skip finished tasks before processing
pre-allocated <br>segment IDs<br> <li> Ensures backward compatibility
for tasks without pre-allocated segment <br>IDs<br> <li> Prevents
marking already-finished tasks as failed during reload</ul>


</details>


  </td>
<td><a
href="https://github.com/milvus-io/milvus/pull/46515/files#diff-0dae7214c4c79ddf5106bd51d375b5fb2f41239d5d433798afa90708e443eca8">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tbody></table>

</details>

___



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved detection of finished compaction tasks to reduce false
failures.
* Prevented finished tasks with missing pre-allocations from being
incorrectly marked as failed.
* Simplified abandonment logic for completed/timeout/cleaned tasks to
reduce erroneous retries and noisy logs.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-23 18:09:18 +08:00
cai.zhangandGitHub 5911cb44e0 enhance: Estimate index task slot using field size instead of segment size (#46275)
issue: #45186

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-23 11:23:22 +08:00
cai.zhangandGitHub 21b0e5ca9d enhance: Don't seal segments when only alter collection properties (#46488)
### **PR Type**
Enhancement


___

### **Description**
- Only flush and fence segments for schema-changing alter collection
messages

- Skip segment sealing for collection property-only alterations

- Add conditional check using messageutil.IsSchemaChange utility
function


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Alter Collection Message"] --> B{"Is Schema Change?"}
  B -->|Yes| C["Flush and Fence Segments"]
  B -->|No| D["Skip Segment Operations"]
  C --> E["Set Flushed Segment IDs"]
  D --> E
  E --> F["Append Operation"]
```



<details><summary><h3>File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>shard_interceptor.go</strong><dd><code>Conditional
segment sealing based on schema changes</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>


internal/streamingnode/server/wal/interceptors/shard/shard_interceptor.go

<ul><li>Added import for <code>messageutil</code> package to access
schema change detection <br>utility<br> <li> Modified
<code>handleAlterCollection</code> to conditionally flush and fence
<br>segments only for schema-changing messages<br> <li> Wrapped segment
flushing logic in <code>if
</code><br><code>messageutil.IsSchemaChange(header)</code> check<br>
<li> Skips unnecessary segment sealing when only collection properties
are <br>altered</ul>


</details>


  </td>
<td><a
href="https://github.com/milvus-io/milvus/pull/46488/files#diff-c1acf785e5b530e59137b21584cf567ccd9aeeb613fb3684294b439289e80beb">+9/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tbody></table>

</details>

___



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Optimized collection schema alteration to conditionally perform
segment allocation operations only when schema changes are detected,
reducing unnecessary overhead in unmodified collection scenarios.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-22 20:55:19 +08:00
cai.zhangandGitHub de3050be54 doc: [skip e2e]Add design document for entity level ttl (#46406)
issue: #46033

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-21 19:13:17 +08:00
cai.zhangandGitHub bb486c0db3 fix: Fix path concatenation error when rootPath = "." in minio (#46220)
issue: #46219

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-10 13:53:13 +08:00
cai.zhangandGitHub b5e11f810d fix: Fix panic when search empty result with output geometry field (#46230)
issue: #46146

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-09 20:37:13 +08:00
cai.zhangandGitHub 141547d8a8 enhance: Add log with segment size for tasks (#46118)
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-05 16:45:11 +08:00
cai.zhangandGitHub cfd49b7680 enhance: Estimate the taskSlot based on whether scalar or vector index (#45850)
issue: #45186

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-04 14:15:10 +08:00
cai.zhangandGitHub eb81e6ed01 fix: Fix setting default value for geometry by restful (#46058)
issue: #46056

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-12-03 23:27:11 +08:00
cai.zhangandGitHub b69cd23c7c fix: Ensure the proxy's shard-leader cache remains stable for coord down test (#45908)
issue: #45847 

After a collection is successfully loaded, the shard-leader state on the
QC may still not be marked as serviceable. It becomes serviceable only
after the scheduled distribution update runs, which will also invalidate
the shard-leader cache on the proxy. Therefore, even if queries are
already executable, the shard-leader mapping on the proxy may still
change afterward.

Try to ensure—as much as possible—that the proxy’s shard-leader cache
remains stable before killing the mixcoord.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-27 19:27:08 +08:00
cai.zhangandGitHub 7c9a9c6f7e fix: Reduce querycoord check node in replica interval for test (#45837)
issue: #45791

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-27 15:07:07 +08:00
cai.zhangandGitHub 61cb29904a fix: Increase the random suffix of the import test collection name (#45854)
issue: #45853

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-26 16:31:08 +08:00
cai.zhangandGitHub 72d4df582f fix: Search before kill coord to ensure proxy init shard leader cache (#45848)
issue: #45847

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-26 04:03:07 +08:00
cai.zhangandGitHub 03a244844e fix: Set task init when worker doesn't have task (#45675)
issue: #45674

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-19 18:03:07 +08:00
cai.zhangandGitHub cc07be3c30 fix: Ignore compaction task when from segment is not healthy (#45534)
issue: #45533

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-13 23:07:39 +08:00
cai.zhangandGitHub 216c576da2 fix: Retain collection early to prevent it from being released before query completion (#45413)
issue: #45314

This PR only ensures that no panic occurs. However, we still need to
provide protection for the delegator handling ongoing query tasks.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-11 20:29:37 +08:00
cai.zhangandGitHub d0d908e51d fix: Fix target segment marked dropped for save stats result twice (#45478)
issue: #45477

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-11 17:19:38 +08:00
cai.zhangandGitHub e3c1673191 fix: Fix filter geometry for growing with mmap (#45464)
issue: #45450

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-11 15:39:36 +08:00
cai.zhangandGitHub 7527ddf50f enhance: [test] Move R-Tree index tests into the implementation package (#45355)
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-07 10:03:33 +08:00
cai.zhangandGitHub b8f9384a85 fix: Skip building text index for newly added columns (#45316)
issue: #45315

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-06 19:47:35 +08:00
cai.zhangandGitHub fa3d4ebfbe fix: Compute the correct batch size for the geometry index of the growing segment (#45253)
issue: #44648

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-04 20:25:37 +08:00
cai.zhangandGitHub 617891b436 fix: Skip create tmp dir for growing R-Tree index (#45256)
issue: #45181

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-04 13:01:32 +08:00
cai.zhangandGitHub 01cf5c9341 enhance: Add log to debug index task (#45198)
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-03 20:01:34 +08:00
cai.zhangandGitHub ed8ba4a28c enhance: Make GeometryCache an optional configuration (#45192)
issue: #45187

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-11-03 19:59:32 +08:00
cai.zhangandGitHub 3c9aa3e784 fix: Fix import null geometry data (#45161)
issue: #44787

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-30 14:18:07 +08:00
cai.zhangandGitHub c33d221536 fix: Fix bug for importing Geometry data (#45089)
issue: #44787 , #45012

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-27 20:34:11 +08:00
cai.zhangandGitHub b069eeecd2 fix: Added GetMetrics back to IndexNodeServer to ensure compatibility (#45073)
issue: #45070

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-24 17:00:06 +08:00
cai.zhangandGitHub 3d11ba06ef fix: Double check to avoid iter has been earsed by other thread (#45013)
issue: #44974

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-21 23:36:04 +08:00
cai.zhangandGitHub b23d75a032 fix: Fix bug for gis function to filter geometry (#44966)
issue: #44961 

This PR fixes 3 geometry related bugs:
1. Implement `ToString` interface for GisFunctionFilter.
2. Ignore GisFunctionFilter `MoveCursor` for growing segment.
3. Don't skip null geometry for building R-Tree index, should be record
in null_offsets.

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-21 09:52:04 +08:00
cai.zhangandGitHub a35a3b7c69 fix: Ensure fulfill promise when CreateArrowFileSystem throw an exception (#44975)
issue: #44974

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-20 23:32:03 +08:00
cai.zhangandGitHub d6aa213799 fix: Fix return EOF when geometry enable null (#44911)
issue: #44648 

If the value is `null` during insertion, it will be omitted instead of
being filled with nil. Therefore, when performing checks, there’s no
need to retrieve data based on the valid offset.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-17 17:12:17 +08:00
cai.zhangandGitHub b0f642fb4c fix: Fix the geometry return POINT(0 0) when growing mmap is enabled (#44889)
issue: #44802 

After a Geometry object is serialized into WKB, the resulting binary may
contain '\0' bytes.
When growing mmap is enabled, the append data logic uses strcpy, which
stops copying at the first '\0' bytes.
This causes only part of the WKB---typically the portion up to the
geometry type field to be copied, leading to corrupted data.
As a result, during parsing, all POINT geometries are incorrectly
interperted as POINT(0 0).

To fix this issue, memcpy will be used instead of strcpy.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-17 17:10:11 +08:00
cai.zhangandGitHub d5ecb63f53 enhance: Support import geometry data by json/csv (#44826)
issue: #44787

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-17 17:08:02 +08:00
cai.zhangandGitHub d8beafd6d0 fix: Skip running scalar index when segment was compacted (#44690)
issue: #44689

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-11 12:05:56 +08:00
cai.zhangandGitHub 7a93cfe890 fix: Fix bug for nullable geometry (#44732)
issue: #44648

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-10-11 11:27:57 +08:00
cai.zhangandGitHub 9d1bb8497c fix: Get R-Tree index correct for growing segment (#44612)
issue: #43427 

R-Tree index is the entire segment, not the chunk.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-09-29 21:34:54 +08:00
cai.zhangandGitHub aecb46a08b fix: Skip empty loop for process growing segment (#44606)
issue: #43427 

The GISFunction asserts that the segment_offsets cannot be nullptr. When
size is 0, the segment_offsets is nullptr, so the loop is skiped.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-09-29 21:15:05 +08:00
19346fa389 feat: Geospatial Data Type and GIS Function support for milvus (#44547)
issue: #43427

This pr's main goal is merge #37417 to milvus 2.5 without conflicts.

# Main Goals

1. Create and describe collections with geospatial type
2. Insert geospatial data into the insert binlog
3. Load segments containing geospatial data into memory
4. Enable query and search can display  geospatial data
5. Support using GIS funtions like ST_EQUALS in query
6. Support R-Tree index for geometry type

# Solution

1. **Add Type**: Modify the Milvus core by adding a Geospatial type in
both the C++ and Go code layers, defining the Geospatial data structure
and the corresponding interfaces.
2. **Dependency Libraries**: Introduce necessary geospatial data
processing libraries. In the C++ source code, use Conan package
management to include the GDAL library. In the Go source code, add the
go-geom library to the go.mod file.
3. **Protocol Interface**: Revise the Milvus protocol to provide
mechanisms for Geospatial message serialization and deserialization.
4. **Data Pipeline**: Facilitate interaction between the client and
proxy using the WKT format for geospatial data. The proxy will convert
all data into WKB format for downstream processing, providing column
data interfaces, segment encapsulation, segment loading, payload
writing, and cache block management.
5. **Query Operators**: Implement simple display and support for filter
queries. Initially, focus on filtering based on spatial relationships
for a single column of geospatial literal values, providing parsing and
execution for query expressions.Now only support brutal search
7. **Client Modification**: Enable the client to handle user input for
geospatial data and facilitate end-to-end testing.Check the modification
in pymilvus.

---------

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: ZhuXi <150327960+Yinwei-Yu@users.noreply.github.com>
2025-09-28 19:43:05 +08:00
cai.zhangandGitHub 76f6768ea1 enhance: Remove timeout for compaction task (#44277)
issue: #44272

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-09-15 11:03:58 +08:00
cai.zhangandGitHub f135dff94d fix: Fix GetCompactionTo return empty results when segment was GCed (#44270)
issue: #44269

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-09-12 18:11:58 +08:00
cai.zhangandGitHub 62d416bf4f fix: Check if ArrayData is nil to prevent panic (#44332)
issue: #44331

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-09-12 14:17:57 +08:00
cai.zhangandGitHub fb43651a74 fix: Fix MultiSegmentWrite only write one segment (#44256)
issue: #44254

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-09-09 14:28:10 +08:00
cai.zhangandGitHub c16296a53f fix: Handle compaction retry state (#44119)
issue: #43776

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-08-29 13:31:51 +08:00
cai.zhangandGitHub eddf188452 fix: Using bucket name in storage config for bulk writer v2 (#44083)
issue: #44082

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-08-27 23:47:51 +08:00
cai.zhangandGitHub 7f470e6bd3 fix: Fix retry state with palyload is not nil (#44068)
issue: #43776

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-08-27 18:11:49 +08:00
cai.zhangandGitHub 77f2fb562f fix: Fix task state is InProgress but payload is nil (#43777)
issue: #43776

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-08-11 14:13:42 +08:00
cai.zhangandGitHub d8a3236e44 fix: Reorder worker proto fields to ensure compatibility (#43735)
issue: #43734

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-08-05 14:59:38 +08:00
cai.zhangandGitHub 74c08069ef fix: Set result storage version for sort compaction (#43521)
issue: #43520

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-23 19:04:53 +08:00
cai.zhangandGitHub f19e0ef6e4 fix: Ensure task execution order by using a priority queue (#43271)
issue: #43260

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-22 17:42:53 +08:00
cai.zhangandGitHub e26a532504 enhance: Only download necessary fields during clustering analyze phase (#43322)
issue: #43310

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-22 16:40:52 +08:00
cai.zhangandGitHub 2adc6ce0bc fix: Call AlterCollection when only rename collection (#43420)
issue: #43407

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-18 15:46:56 +08:00
cai.zhangandGitHub c54a04c71c fix: L2 segments remain as L2 even after sort compaction (#43237)
issue: #43186

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-11 11:30:48 +08:00
cai.zhangandGitHub 3ffd44f302 fix: Fix remaining issues with Datanode pooling and StorageV2 (#43147)
issue: #43146

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-10 14:26:48 +08:00
cai.zhangandGitHub 47144429bf fix: Fix regeneratePartitionStats failed after restore clusteringCompactionTask (#43205)
issue: #43186

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-10 10:40:47 +08:00
cai.zhangandGitHub 95e767611a fix: Fix merge sort loss data when last row in a record is deleted (#43216)
issue: #43207

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-09 22:18:48 +08:00
cai.zhangandGitHub 41d1c8d6b3 fix: Handle error for invalid function params and prevent panic (#43189)
issue: #43188

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-09 12:46:46 +08:00
cai.zhangandGitHub 6989e18599 enhance: Move sort stats task to sort compaction (#42562)
issue: #42560

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-08 20:22:47 +08:00
cai.zhangandGitHub 8720feeb79 fix: Fix enqueuing when current batch is fully deleted (#43174)
issue: #43045

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-08 12:20:46 +08:00
cai.zhangandGitHub 4133e3b8fd fix: Enable merge sort and fix sort bug (#43080)
issue: #42980, #43034

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-04 10:18:44 +08:00
cai.zhangandGitHub f6b2a71c95 enhance: Remove chunkmanager-related dependencies from datanode (#43021)
issue: #41611

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-07-03 14:44:45 +08:00
cai.zhangandGitHub c82943dca1 enhance: Enable mergeSort by default starting from version 2.6.0 (#42981)
issue: #42980 

Enable mergeSort for mix compaction to reduce sort stats tasks.

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-30 21:46:43 +08:00
cai.zhangandGitHub ebe1c95bb1 enhance: Add Size interface to FileReader to eliminate the StatObject call during Read (#42908)
issue: #42907

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-25 14:36:41 +08:00
cai.zhangandGitHub 59b003adac enhance: Skip modify field meta when rename collection or rename dbName (#42875)
issue: #42873

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-23 17:04:41 +08:00
cai.zhangandGitHub 8f8ffe9989 fix: Reduce task slot for standalone to 1/4 of normal datanode (#42808)
issue: #42129

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
2025-06-20 16:38:46 +08:00