mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-30 07:25:37 +08:00
issue: #33285 - support transaction on single wal. - last confirmed message id can still be used when enable transaction. - add fence operation for segment allocation interceptor. --------- Signed-off-by: chyezh <chyezh@outlook.com>
31 lines
907 B
Go
31 lines
907 B
Go
package manager
|
|
|
|
import (
|
|
"go.uber.org/atomic"
|
|
|
|
"github.com/milvus-io/milvus/internal/streamingnode/server/wal/interceptors/segment/stats"
|
|
"github.com/milvus-io/milvus/internal/streamingnode/server/wal/interceptors/txn"
|
|
)
|
|
|
|
// AssignSegmentRequest is a request to allocate segment.
|
|
type AssignSegmentRequest struct {
|
|
CollectionID int64
|
|
PartitionID int64
|
|
InsertMetrics stats.InsertMetrics
|
|
TimeTick uint64
|
|
TxnSession *txn.TxnSession
|
|
}
|
|
|
|
// AssignSegmentResult is a result of segment allocation.
|
|
// The sum of Results.Row is equal to InserMetrics.NumRows.
|
|
type AssignSegmentResult struct {
|
|
SegmentID int64
|
|
Acknowledge *atomic.Int32 // used to ack the segment assign result has been consumed
|
|
}
|
|
|
|
// Ack acks the segment assign result has been consumed.
|
|
// Must be only call once after the segment assign result has been consumed.
|
|
func (r *AssignSegmentResult) Ack() {
|
|
r.Acknowledge.Dec()
|
|
}
|