Skip to content

Commit

Permalink
lease: use monotimer for lease
Browse files Browse the repository at this point in the history
lease uses monotimer to calculate its expiration. In this way, changing system time won't affect in lease expiration.

FIX #6700
  • Loading branch information
fanminshi committed Nov 28, 2016
1 parent ec5f9bc commit e99e48a
Show file tree
Hide file tree
Showing 35 changed files with 5,969 additions and 16 deletions.
6 changes: 4 additions & 2 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ toggle_failpoints() {

etcd_build() {
out="bin"
on=0
if [[ "$OSTYPE" == "darwin"* ]]; then on=1; fi
if [ -n "${BINDIR}" ]; then out="${BINDIR}"; fi
toggle_failpoints
# Static compilation is useful when etcd is run in a container
CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "$GO_LDFLAGS" -o ${out}/etcd ${REPO_PATH}/cmd/etcd || return
CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "$GO_LDFLAGS" -o ${out}/etcdctl ${REPO_PATH}/cmd/etcdctl || return
CGO_ENABLED=$on go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "$GO_LDFLAGS" -o ${out}/etcd ${REPO_PATH}/cmd/etcd || return
CGO_ENABLED=$on go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "$GO_LDFLAGS" -o ${out}/etcdctl ${REPO_PATH}/cmd/etcdctl || return
}

etcd_setup_gopath() {
Expand Down
202 changes: 202 additions & 0 deletions cmd/vendor/github.com/ScaleFT/monotime/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions cmd/vendor/github.com/ScaleFT/monotime/NOTICE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions cmd/vendor/github.com/ScaleFT/monotime/clock_clock_gettime.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions cmd/vendor/github.com/ScaleFT/monotime/clock_mach_absolute_time.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions cmd/vendor/github.com/ScaleFT/monotime/clock_runtime_nanotime.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions cmd/vendor/github.com/ScaleFT/monotime/clock_windows_qpf.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions cmd/vendor/github.com/ScaleFT/monotime/issue15006.s

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e99e48a

Please sign in to comment.