fixed name size to 230 due to previous commit acknowledgement

This commit is contained in:
David Kagan 2023-04-07 14:21:17 -04:00
parent af081fd639
commit c7a709039a

View file

@ -47,7 +47,7 @@ var (
ErrInvalidView = errors.New("invalid view")
ErrInvalidCacheType = errors.New("invalid cache type")
ErrName = errors.New("invalid index or field name, must match [a-z][a-z0-9Θ_-]* and contain at most 300 characters")
ErrName = errors.New("invalid index or field name, must match [a-z][a-z0-9Θ_-]* and contain at most 230 characters")
// ErrFragmentNotFound is returned when a fragment does not exist.
ErrFragmentNotFound = errors.New("fragment not found")
@ -135,7 +135,11 @@ func newPreconditionFailedError(err error) PreconditionFailedError {
}
// Regular expression to validate index and field names.
var nameRegexp = regexp.MustCompile(`^[a-z][a-z0-9Θ_-]{0,299}$`)
// The lowest limitation I've seen on any filesystem we care about is 255
// characters. 230 leaves enough space that an index or field could be
// backed up and have a timestamp and file extension appended while
// still allowing for much longer index and field names. --Jaffee
var nameRegexp = regexp.MustCompile(`^[a-z][a-z0-9Θ_-]{0,229}$`)
// TimeFormat is the go-style time format used to parse string dates.
const TimeFormat = "2006-01-02T15:04"