mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
If non-primary host fails to process a request, retry on primary node. conditions when we should not do this: - no error - we've aleady tried the primary - we're making a status request to get the primary node...this could lead to lock contention if we allow it to happen as we are making an http request within an on going http request to discover the primary node. This also deletes the RemoveHost method and the associated test b/c it is not used anywhere anymore and updates the returned error type.
25 lines
1.3 KiB
Go
25 lines
1.3 KiB
Go
// Copyright 2021 Molecula Corp. All rights reserved.
|
|
package client
|
|
|
|
import "github.com/pkg/errors"
|
|
|
|
// Predefined Pilosa errors.
|
|
var (
|
|
ErrEmptyCluster = errors.New("No usable addresses in the cluster")
|
|
ErrIndexExists = errors.New("Index exists")
|
|
ErrFieldExists = errors.New("Field exists")
|
|
ErrInvalidIndexName = errors.New("Invalid index name")
|
|
ErrInvalidFieldName = errors.New("Invalid field name")
|
|
ErrInvalidLabel = errors.New("Invalid label")
|
|
ErrInvalidKey = errors.New("Invalid key")
|
|
ErrHTTPRequest = errors.New("Failed all HTTP retries")
|
|
ErrAddrURIClusterExpected = errors.New("Addresses, URIs or a cluster is expected")
|
|
ErrInvalidQueryOption = errors.New("Invalid query option")
|
|
ErrInvalidIndexOption = errors.New("Invalid index option")
|
|
ErrInvalidFieldOption = errors.New("Invalid field option")
|
|
ErrNoFragmentNodes = errors.New("No fragment nodes")
|
|
ErrNoShard = errors.New("Index has no shards")
|
|
ErrUnknownType = errors.New("Unknown type")
|
|
ErrSingleServerAddressRequired = errors.New("OptClientManualServerAddress requires a single URI or address")
|
|
ErrPreconditionFailed = errors.New("Precondition failed")
|
|
)
|