From d2bf6b02f8952f7487d3b59800984b11a1919789 Mon Sep 17 00:00:00 2001 From: Ayan George Date: Tue, 5 Nov 2019 15:14:13 -0500 Subject: [PATCH] refactor: permanently enable uint64 support * Remove all instances of EnableUintSupport() * Remove all instances of enableUint64Support Closes #15711 --- models/points.go | 24 ------------------------ models/uint_support.go | 7 ------- 2 files changed, 31 deletions(-) delete mode 100644 models/uint_support.go diff --git a/models/points.go b/models/points.go index 57e2d611adf..c978b3157ec 100644 --- a/models/points.go +++ b/models/points.go @@ -18,16 +18,6 @@ import ( "github.com/influxdata/influxdb/pkg/escape" ) -// FIXME(edd): this temporarily enables uint64 support. It should be enabled by -// default in 2.0. Therefore we need to pay down all the technical debt of cleaning -// up all the conditionals within this package. -// -// This issue tracks the cleanup work: -// https://github.com/influxdata/influxdb/issues/15711 -func init() { - EnableUintSupport() -} - // Values used to store the field key and measurement name as special internal tags. const ( FieldKeyTagKey = "\xff" @@ -76,16 +66,6 @@ const ( MaxKeyLength = 65535 ) -// enableUint64Support will enable uint64 support if set to true. -var enableUint64Support = false - -// EnableUintSupport manually enables uint support for the point parser. -// This function will be removed in the future and only exists for unit tests during the -// transition. -func EnableUintSupport() { - enableUint64Support = true -} - // Point defines the values that will be written to the database. type Point interface { // Name return the measurement name for the point. @@ -1075,10 +1055,6 @@ func scanNumber(buf []byte, i int) (int, error) { } } } else if isUnsigned { - // Return an error if uint64 support has not been enabled. - if !enableUint64Support { - return i, ErrInvalidNumber - } // Make sure the last char is a 'u' for unsigned if buf[i-1] != 'u' { return i, ErrInvalidNumber diff --git a/models/uint_support.go b/models/uint_support.go deleted file mode 100644 index 18d1ca06e2d..00000000000 --- a/models/uint_support.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build uint uint64 - -package models - -func init() { - EnableUintSupport() -}