Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSM Bug Fixes/Go 1.4.3 #5331

Merged
merged 4 commits into from
Jan 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ $fmtcount -gt 0 ]; then
fi

# Due to the way composites work, vet will fail for some of our tests so we ignore it
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not apply anymore, right?

vetcount=`go tool vet --composites=false ./ 2>&1 | wc -l`
vetcount=`go tool vet -composites=true ./ 2>&1 | wc -l`
if [ $vetcount -gt 0 ]; then
echo "Some files aren't passing vet heuristics, please run 'go vet ./...' to see the errors it flags and correct your source code before committing"
exit 1
Expand Down
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
## v0.10.0 [unreleased]

With this release InfluxDB is moving to Go 1.5.

### Features
- [#5183](https://github.com/influxdb/influxdb/pull/5183): CLI confirms database exists when USE executed. Thanks @pires
- [#5201](https://github.com/influxdb/influxdb/pull/5201): Allow max UDP buffer size to be configurable. Thanks @sebito91
Expand All @@ -25,6 +23,7 @@ With this release InfluxDB is moving to Go 1.5.
- [#5158](https://github.com/influxdb/influxdb/pull/5158): Fix panic when writing invalid input to the line protocol.
- [#5264](https://github.com/influxdata/influxdb/pull/5264): Fix panic: runtime error: slice bounds out of range
- [#5186](https://github.com/influxdata/influxdb/pull/5186): Fix database creation with retention statement parsing. Fixes [#5077](https://github.com/influxdb/influxdb/issues/5077). Thanks @pires
- [#5193](https://github.com/influxdata/influxdb/issues/5193): Missing data a minute before current time. Comes back later.

## v0.9.6 [2015-12-09]

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ second to sign our CLA, which can be found

Installing Go
-------------
InfluxDB requires Go 1.5.2 or greater.
InfluxDB requires Go 1.4.3.

At InfluxDB we find gvm, a Go version manager, useful for installing Go. For instructions
on how to install it see [the gvm page on github](https://github.com/moovweb/gvm).

After installing gvm you can install and set the default go version by
running the following:

gvm install go1.5.2
gvm use go1.5.2 --default
gvm install go1.4.3
gvm use go1.4.3 --default

Revision Control Systems
-------------
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_build_ubuntu32
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN gem install fpm

# Install go
ENV GOPATH /root/go
ENV GO_VERSION 1.5.2
ENV GO_VERSION 1.4.3
ENV GO_ARCH 386
RUN wget https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \
tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile_build_ubuntu64
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ RUN apt-get update && apt-get install -y \

RUN gem install fpm

# Install go1.5+
# Install go
ENV GOPATH /root/go
ENV GO_VERSION 1.5.2
ENV GO_VERSION 1.4.3
ENV GO_ARCH amd64
RUN wget https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \
tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile_build_ubuntu64_git
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ RUN mkdir -p $PROJECT_DIR
VOLUME $PROJECT_DIR


# Install go1.5+
ENV GO_VERSION 1.5.2
# Install go
ENV GO_VERSION 1.4.3
ENV GO_ARCH amd64
RUN wget https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \
tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_test_ubuntu32
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM 32bit/ubuntu:14.04

RUN apt-get update && apt-get install -y python-software-properties software-properties-common git
RUN add-apt-repository ppa:evarlast/golang1.5
RUN add-apt-repository ppa:evarlast/golang1.4
RUN apt-get update && apt-get install -y -o Dpkg::Options::="--force-overwrite" golang-go

ENV GOPATH=/root/go
Expand Down
9 changes: 6 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,11 @@ def upload_packages(packages, nightly=False):
print ""

def run_tests(race, parallel, timeout, no_vet):
get_command = "go get -d -t ./..."
print "Retrieving Go dependencies...",
get_command = "go get -d -t ./..."
sys.stdout.flush()
run(get_command)
get_command = "go get golang.org/x/tools/cmd/vet"
sys.stdout.flush()
run(get_command)
print "done."
Expand All @@ -254,7 +257,7 @@ def run_tests(race, parallel, timeout, no_vet):
print err
return False
if not no_vet:
p = subprocess.Popen(["go", "tool", "vet", "-composites=false", "./"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p = subprocess.Popen(["go", "tool", "vet", "-composites=true", "./"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if len(out) > 0 or len(err) > 0:
print "Go vet failed. Please run 'go vet ./...' and fix any errors."
Expand Down Expand Up @@ -493,7 +496,7 @@ def print_usage():
print "\t --commit=<commit> \n\t\t- Use specific commit for build (currently a NOOP)."
print "\t --branch=<branch> \n\t\t- Build from a specific branch (currently a NOOP)."
print "\t --rc=<rc number> \n\t\t- Whether or not the build is a release candidate (affects version information)."
print "\t --iteration=<iteration number> \n\t\t- The iteration to display on the package output (defaults to 0 for RC's, and 1 otherwise)."
print "\t --iteration=<iteration number> \n\t\t- The iteration to display on the package output (defaults to 0 for RC's, and 1 otherwise)."
print "\t --race \n\t\t- Whether the produced build should have race detection enabled."
print "\t --package \n\t\t- Whether the produced builds should be packaged for the target platform(s)."
print "\t --nightly \n\t\t- Whether the produced build is a nightly (affects version information)."
Expand Down
11 changes: 2 additions & 9 deletions etc/config.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ reporting-disabled = false
[data]
dir = "/var/lib/influxdb/data"

# Controls the storage engine used for new shards. Engines available are b1,
# bz1, and tsm1. b1 was the original default engine from 0.9.0 to 0.9.2. bz1
# has been the default engine since 0.9.3. tsm1 was introduced in 0.9.5 and is
# currently EXPERIMENTAL. Consequently, data written into the tsm1 engine may
# need to be wiped between upgrades.
# engine ="bz1"

# The following WAL settings are for the b1 storage engine used in 0.9.2. They won't
# apply to any new shards created after upgrading to a version > 0.9.3.
max-wal-size = 104857600 # Maximum size the WAL can reach before a flush. Defaults to 100MB.
Expand Down Expand Up @@ -152,7 +145,7 @@ reporting-disabled = false
###

[cluster]
shard-writer-timeout = "5s" # The time within which a remote shard must respond to a write request.
shard-writer-timeout = "5s" # The time within which a remote shard must respond to a write request.
write-timeout = "10s" # The time within which a write request must complete on the cluster.

###
Expand Down Expand Up @@ -330,7 +323,7 @@ reporting-disabled = false
# batch-pending = 5 # number of batches that may be pending in memory
# batch-timeout = "1s" # will flush at least this often even if we haven't hit buffer limit
# read-buffer = 0 # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.

# set the expected UDP payload size; lower values tend to yield better performance, default is max UDP size 65536
# udp-payload-size = 65536

Expand Down
2 changes: 1 addition & 1 deletion package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if [ -z "$FPM" ]; then
FPM=`which fpm`
fi

GO_VERSION="go1.5.2"
GO_VERSION="go1.4.3"
GOPATH_INSTALL=
BINS=(
influxd
Expand Down
12 changes: 2 additions & 10 deletions tsdb/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ package tsdb
import (
"errors"
"fmt"
"log"
"os"
"time"

"github.com/influxdb/influxdb/toml"
)

const (
// DefaultEngine is the default engine for new shards
DefaultEngine = "bz1"
DefaultEngine = "tsm1"

// DefaultMaxWALSize is the default size of the WAL before it is flushed.
DefaultMaxWALSize = 100 * 1024 * 1024 // 100MB
Expand Down Expand Up @@ -104,14 +102,8 @@ type Config struct {
}

func NewConfig() Config {
defaultEngine := DefaultEngine
if engine := os.Getenv("INFLUXDB_DATA_ENGINE"); engine != "" {
log.Println("TSDB engine selected via environment variable:", engine)
defaultEngine = engine
}

return Config{
Engine: defaultEngine,
Engine: DefaultEngine,
MaxWALSize: DefaultMaxWALSize,
WALFlushInterval: toml.Duration(DefaultWALFlushInterval),
WALPartitionFlushDelay: toml.Duration(DefaultWALPartitionFlushDelay),
Expand Down
Loading