mirror of https://github.com/milvus-io/milvus.git
enhance: Fix misleading log content & possible nil panic (#31021)
- Change load field log from "dy pool" to "load pool" - Also defer delete when there is no error Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/30565/head
parent
c047f09110
commit
30398d4b71
|
@ -873,7 +873,7 @@ func (s *LocalSegment) LoadFieldData(ctx context.Context, fieldID int64, rowCoun
|
|||
|
||||
var status C.CStatus
|
||||
GetLoadPool().Submit(func() (any, error) {
|
||||
log.Info("submitted loadFieldData task to dy pool")
|
||||
log.Info("submitted loadFieldData task to load pool")
|
||||
if paramtable.Get().CommonCfg.EnableStorageV2.GetAsBool() {
|
||||
uri, err := typeutil_internal.GetStorageURI(paramtable.Get().CommonCfg.StorageScheme.GetValue(), paramtable.Get().CommonCfg.StoragePathPrefix.GetValue(), s.segmentID)
|
||||
if err != nil {
|
||||
|
@ -1007,10 +1007,10 @@ func (s *LocalSegment) AddFieldDataInfo(ctx context.Context, rowCount int64, fie
|
|||
)
|
||||
|
||||
loadFieldDataInfo, err := newLoadFieldDataInfo(ctx)
|
||||
defer deleteFieldDataInfo(loadFieldDataInfo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer deleteFieldDataInfo(loadFieldDataInfo)
|
||||
|
||||
for _, field := range fields {
|
||||
fieldID := field.FieldID
|
||||
|
@ -1332,9 +1332,9 @@ func (s *LocalSegment) Release(opts ...releaseOption) {
|
|||
void
|
||||
deleteSegment(CSegmentInterface segment);
|
||||
*/
|
||||
// wait all read ops finished
|
||||
var ptr C.CSegmentInterface
|
||||
|
||||
// wait all read ops finished
|
||||
s.ptrLock.Lock()
|
||||
ptr = s.ptr
|
||||
s.ptr = nil
|
||||
|
|
Loading…
Reference in New Issue