Documentation ¶
Index ¶
- Constants
- Variables
- func CheckHealthy(state commonpb.StateCode) error
- func Code(err error) int32
- func Combine(errs ...error) error
- func Error(status *commonpb.Status) error
- func IsRetriable(err error) bool
- func Ok(status *commonpb.Status) bool
- func Status(err error) *commonpb.Status
- func WrapErrAverageLabelNotRegister(label string, msg ...string) error
- func WrapErrChannelLack(name string, msg ...string) error
- func WrapErrChannelNotFound(name string, msg ...string) error
- func WrapErrChannelReduplicate(name string, msg ...string) error
- func WrapErrCollectionNotFound(collection any, msg ...string) error
- func WrapErrCollectionNotLoaded(collection any, msg ...string) error
- func WrapErrCollectionResourceLimitExceeded(msg ...string) error
- func WrapErrIndexNotFound(msg ...string) error
- func WrapErrIoFailed(key string, msg ...string) error
- func WrapErrIoKeyNotFound(key string, msg ...string) error
- func WrapErrMetricNotFound(name string, msg ...string) error
- func WrapErrNoAvailableNodeInReplica(id int64, msg ...string) error
- func WrapErrNodeLack(expectedNum, actualNum int64, msg ...string) error
- func WrapErrNodeNotFound(id int64, msg ...string) error
- func WrapErrNodeNotMatch(expectedNodeID, actualNodeID int64, msg ...string) error
- func WrapErrNodeOffline(id int64, msg ...string) error
- func WrapErrParameterDuplicateFieldData(fieldName string, msg ...string) error
- func WrapErrParameterInvalid[T any](expected, actual T, msg ...string) error
- func WrapErrParameterInvalidRange[T any](lower, upper, actual T, msg ...string) error
- func WrapErrPartitionNotFound(partition any, msg ...string) error
- func WrapErrPartitionNotLoaded(partition any, msg ...string) error
- func WrapErrReplicaNotFound(id int64, msg ...string) error
- func WrapErrResourceGroupNotFound(rg any, msg ...string) error
- func WrapErrSegmentLack(id int64, msg ...string) error
- func WrapErrSegmentNotFound(id int64, msg ...string) error
- func WrapErrSegmentNotLoaded(id int64, msg ...string) error
- func WrapErrSegmentReduplicate(id int64, msg ...string) error
- func WrapErrServiceInternal(msg string, others ...string) error
- func WrapErrServiceMemoryLimitExceeded(predict, limit float32, msg ...string) error
- func WrapErrServiceNotReady(stage string, msg ...string) error
- func WrapErrServiceRequestLimitExceeded(limit int32, msg ...string) error
- func WrapErrServiceUnavailable(reason string, msg ...string) error
- func WrapErrShardDelegatorNotFound(channel string, msg ...string) error
- func WrapErrTaskQueueFull(msg ...string) error
- func WrapErrTopicNotEmpty(name string, msg ...string) error
- func WrapErrTopicNotFound(name string, msg ...string) error
Constants ¶
const ( CanceledCode int32 = 10000 TimeoutCode int32 = 10001 )
Variables ¶
var ( // Service related ErrServiceNotReady = newMilvusError("service not ready", 1, true) // This indicates the service is still in init ErrServiceMemoryLimitExceeded = newMilvusError("memory limit exceeded", 3, false) ErrServiceRequestLimitExceeded = newMilvusError("request limit exceeded", 4, true) ErrServiceInternal = newMilvusError("service internal error", 5, false) // Never return this error out of Milvus // Collection related ErrCollectionNotFound = newMilvusError("collection not found", 100, false) ErrCollectionNotLoaded = newMilvusError("collection not loaded", 101, false) ErrCollectionNumLimitExceeded = newMilvusError("exceeded the limit number of collections", 102, false) // Partition related ErrPartitionNotFound = newMilvusError("partition not found", 202, false) ErrPartitionNotLoaded = newMilvusError("partition not loaded", 203, false) // ResourceGroup related ErrResourceGroupNotFound = newMilvusError("resource group not found", 300, false) // Replica related ErrReplicaNotFound = newMilvusError("replica not found", 400, false) ErrNoAvailableNodeInReplica = newMilvusError("no available node in replica", 401, false) // Channel related ErrChannelNotFound = newMilvusError("channel not found", 500, false) ErrChannelLack = newMilvusError("channel lacks", 501, false) ErrChannelReduplicate = newMilvusError("channel reduplicates", 502, false) // Segment related ErrSegmentNotFound = newMilvusError("segment not found", 600, false) ErrSegmentNotLoaded = newMilvusError("segment not loaded", 601, false) ErrSegmentLack = newMilvusError("segment lacks", 602, false) ErrSegmentReduplicate = newMilvusError("segment reduplicates", 603, false) // Index related ErrIndexNotFound = newMilvusError("index not found", 700, false) // Node related ErrNodeNotFound = newMilvusError("node not found", 901, false) ErrNodeOffline = newMilvusError("node offline", 902, false) ErrNodeLack = newMilvusError("node lacks", 903, false) ErrNodeNotMatch = newMilvusError("node not match", 904, false) // IO related ErrIoKeyNotFound = newMilvusError("key not found", 1000, false) ErrIoFailed = newMilvusError("IO failed", 1001, false) // Parameter related ErrParameterInvalid = newMilvusError("invalid parameter", 1100, false) // Metrics related ErrMetricNotFound = newMilvusError("metric not found", 1200, false) // Topic related ErrTopicNotFound = newMilvusError("topic not found", 1300, false) ErrTopicNotEmpty = newMilvusError("topic not empty", 1301, false) // Average related ErrAverageLabelNotRegister = newMilvusError("average label not register", 1400, false) // shard delegator related ErrShardDelegatorNotFound = newMilvusError("shard delegator not found", 1500, false) // task related ErrTaskQueueFull = newMilvusError("task queue full", 1600, false) )
Define leaf errors here, WARN: take care to add new error, check whehter you can use the erorrs below before adding a new one. Name: Err + related prefix + error name
Functions ¶
func CheckHealthy ¶
CheckHealthy checks whether the state is healthy, returns nil if healthy, otherwise returns ErrServiceNotReady wrapped with current state
func Error ¶
Error returns a error according to the given status, returns nil if the status is a success status
func IsRetriable ¶
func Status ¶
Status returns a status according to the given err, returns Success status if err is nil
func WrapErrAverageLabelNotRegister ¶
Average related
func WrapErrChannelLack ¶
func WrapErrChannelNotFound ¶
Channel related
func WrapErrCollectionNotFound ¶
Collection related
func WrapErrIoFailed ¶
func WrapErrMetricNotFound ¶
Metrics related
func WrapErrNodeLack ¶
func WrapErrNodeNotMatch ¶
func WrapErrNodeOffline ¶
func WrapErrParameterInvalid ¶
Parameter related
func WrapErrPartitionNotFound ¶
Partition related
func WrapErrReplicaNotFound ¶
Replica related
func WrapErrResourceGroupNotFound ¶
ResourceGroup related
func WrapErrSegmentLack ¶
func WrapErrSegmentNotFound ¶
Segment related
func WrapErrSegmentNotLoaded ¶
func WrapErrServiceInternal ¶
func WrapErrServiceNotReady ¶
Service related
func WrapErrShardDelegatorNotFound ¶
shard delegator related
func WrapErrTopicNotEmpty ¶
func WrapErrTopicNotFound ¶
Topic related
Types ¶
This section is empty.