Commit Graph

56 Commits (424c29eaccae446ea1579402e7016a126942984e)

Author SHA1 Message Date
Xiang Li d459ae0df3 store: remove unused ACL field 2015-02-28 11:46:21 -08:00
Xiang Li 9776e6d082 store: fix modifiedindex in node clone 2015-02-05 22:26:52 -08:00
Jonathan Boulle f1ed69e883 *: switch to line comments for copyright
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Xiang Li 773f112a5d store: return utc time to user 2014-12-11 16:24:33 -08:00
Jonathan Boulle 7a4d42166b *: add license header to all source files 2014-10-17 15:41:22 -07:00
Jonathan Boulle 3134658ded store: switch to fake clock 2014-10-17 10:05:29 -07:00
Jonathan Boulle a07c51a9c9 store: fix typo "recurisive" 2014-10-08 14:13:38 -07:00
Blake Mizerany a2b9f9310c remove pkg/strings 2014-09-03 09:20:06 -07:00
Xiang Li 8ea840c19a store: fix index data race 2014-09-03 09:19:53 -07:00
Yicheng Qin c8de5eee85 fix(server/key): unable to update unexpired ttl 2014-04-14 11:03:46 -07:00
Mikhail Goncharov 074c78d725 fix(store): corrected CAS and CAD fail cause in response
specifically when both prevIndex and prevValue are provided
2014-03-08 14:50:34 +07:00
evan-gu 9cfd8c5f0b fix(store): make NodeExtern.Value a *string
Before this change if the value of a Node was "" it would get dropped from the json
encoding and the Node.Value field would be missing. Fix this problem by making
NodeExtern.Value a *string so that an empty string will be encoded but a nil value
will drop the field.
2014-02-18 00:50:44 -05:00
Brandon Philips 1b00c449a5 Revert "Better error message when setting values on directories"
This reverts commit d13dd50d51.
2014-01-23 11:22:11 -08:00
Kelsey Hightower d13dd50d51 Better error message when setting values on directories
Without this commit etcd returns the following error message when
setting values on directories:

    {
      "errorCode":102,
      "message":"Not a file",
      "cause":"/postgres",
      "index":2
    }

While the above error message is accurate it's not very descriptive.
This commit adds a new error code/message which better describes why the
write operation failed. etcd now returns the following:

    {
      "errorCode":109,
      "message":"Cannot set value on directory",
      "cause":"/postgres",
      "index":2
    }
2014-01-22 23:02:33 -08:00
rwindelz a2e5bae951 fix(store): TTL should range 1..n rather than 1..n+1
was experiencing intermittent functional test fails where TTL was eg 101
when 100 was expected
informal testing on a windows platform shows Go times resolving to the
nanosecond but with an accuracy of approximately 1 millisecond
I believe some of the functional test steps would run in under a
millisecond and cause the TTL to be recomputed with the same time.Now()
value resulting in a TTL that was +1 from the expected
2014-01-19 21:45:53 -08:00
Xiang Li f46fdbf078 feat(node_extern.go) add prevNode field 2014-01-01 19:50:07 +08:00
Xiang Li 9cf1fcc987 refactor(compareAndDelete) 2013-12-20 05:10:22 +08:00
Xiang Li 59e98fcc62 doc fix grammar issue 2013-12-09 11:33:55 -05:00
Xiang Li 0762c79e2e refactor remove unused const 2013-12-05 21:04:00 -05:00
Xiang Li b556252358 tests fix all tests 2013-12-05 17:48:32 -05:00
Xiang Li 40d297be66 feat add dir_flag 2013-12-05 17:10:37 -05:00
Xiang Li 67b4c27d5d refactor change node_repr to node_extern 2013-11-28 21:34:38 -05:00
Xiang Li b7d07ea5c8 refactor event 2013-11-28 11:33:40 -05:00
Xiang Li 08c59895b5 refactor(Node) do not expose node struct 2013-11-28 11:33:23 -05:00
Xiang Li cb4b6f1fe4 feat add modifiedIndex in kvpair 2013-11-09 20:52:06 -08:00
Xiang Li 06f1b7f2e8 refactor change Index to modifiedIndex 2013-11-09 20:49:19 -08:00
Xiang Li d8e5994c35 feat attach etcd-index,raft-index,raft-term to header 2013-11-09 20:20:47 -08:00
Xiang Li d87e0e93d3 fix get return the last modified index of the node 2013-11-09 19:05:38 -08:00
Xiang Li 6156d5c790 refactor separate etcd index from raft index 2013-11-09 17:55:54 -08:00
Xiang Li acd940a450 refactor comments on IsPermanent 2013-11-08 13:37:30 -08:00
Xiang Li 779195eb4f fix bug in update ttl 2013-11-05 22:18:54 -08:00
Xiang Li 49c55477e5 refactor clean up 2013-11-05 21:56:21 -08:00
Xiang Li 797d996535 init sync to delete expiring keys 2013-11-05 21:47:25 -08:00
Xiang Li 07b52ee24c fix save and recovery 2013-11-04 21:51:14 -08:00
Xiang Li 0d8510df33 refactor use push 2013-11-04 21:36:05 -08:00
Xiang Li c5a6f9bb6b fix iszero 2013-11-04 21:22:22 -08:00
Xiang Li 3f6d6cf4c6 refactor use time.IsZero 2013-11-04 20:56:41 -08:00
Xiang Li 0e15962cef Merge pull request #276 from xiangli-cmu/feat-kvpair-ttl
feat kvpair include ttl
2013-10-30 15:56:28 -07:00
Xiang Li 7b60f8bdc3 feat kvpair include ttl 2013-10-26 21:21:48 -07:00
Xiang Li 1fb3799118 fix put ttl 2013-10-26 21:04:44 -07:00
Ben Johnson 1321c63f3b Extract Store into an interface. 2013-10-14 11:12:30 -06:00
Xiang Li 75959f9948 refactor add node.ExpirationAndTTL 2013-10-08 21:49:10 -07:00
Xiang Li c3e2332479 refactor separate kvpair to kvpair.go; simplify sorting interface 2013-10-08 21:25:56 -07:00
Xiang Li 3c7f9215d1 comments node.go 2013-10-07 23:30:51 -07:00
Xiang Li 48e6137f46 fix node.go race between expire and update 2013-10-07 23:21:39 -07:00
Xiang Li a07802a347 refactor node.go; use once 2013-10-07 23:12:13 -07:00
Xiang Li a71838a59b refactor watcher.go 2013-10-07 22:17:58 -07:00
Xiang Li baaaf24f70 (feat) v1 apt backward support 2013-10-06 11:23:52 -07:00
Xiang Li 558d30f33f simplify lock 2013-09-30 23:18:52 -07:00
evan-gu 974d74befb add some comment and change a declaration form 2013-10-01 01:25:45 -04:00