fix: [skip e2e]Increase graceful time to ensure that bounded search executing normally (#31064)

issue: #31063 
Increase the graceful time to ensure that bounded query requests can be
executed normally in the event of RootCoord failure.

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
This commit is contained in:
cai.zhang 2024-03-07 10:53:00 +08:00 committed by GitHub
parent 8ff8fefdc1
commit 951c91c9b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,6 +38,7 @@ import (
"github.com/milvus-io/milvus/pkg/util/funcutil"
"github.com/milvus-io/milvus/pkg/util/merr"
"github.com/milvus-io/milvus/pkg/util/metric"
"github.com/milvus-io/milvus/pkg/util/paramtable"
"github.com/milvus-io/milvus/tests/integration"
)
@ -279,6 +280,9 @@ func (s *CoordDownSearch) searchAfterCoordDown() float64 {
var err error
c := s.Cluster
params := paramtable.Get()
paramtable.Init()
start := time.Now()
log.Info("=========================Data Coordinators stopped=========================")
c.DataCoord.Stop()
@ -294,8 +298,10 @@ func (s *CoordDownSearch) searchAfterCoordDown() float64 {
log.Info("=========================Root Coordinators stopped=========================")
c.RootCoord.Stop()
params.Save(params.CommonCfg.GracefulTime.Key, "60000")
s.search(searchCollectionName, Dim, commonpb.ConsistencyLevel_Bounded)
s.search(searchCollectionName, Dim, commonpb.ConsistencyLevel_Eventually)
params.Reset(params.CommonCfg.GracefulTime.Key)
failedStart := time.Now()
s.searchFailed(searchCollectionName, Dim, commonpb.ConsistencyLevel_Strong)
log.Info(fmt.Sprintf("=========================Failed search cost: %fs=========================", time.Since(failedStart).Seconds()))