Browse Source

Merge pull request #730 from unihorn/65

chore(server): deprecate mod temporarily
Yicheng Qin 11 years ago
parent
commit
9f228550a2
4 changed files with 19 additions and 5 deletions
  1. 7 2
      Documentation/api.md
  2. 6 0
      Documentation/modules.md
  3. 3 1
      server/server.go
  4. 3 2
      test.sh

+ 7 - 2
Documentation/api.md

@@ -843,12 +843,14 @@ The client is told the write was successful and the keyspace is updated.
 Meanwhile F2 has partitioned from the network and will have an out-of-date version of the keyspace until the partition resolves.
 Since F2 missed the most recent write, a client reading from F2 will have an out-of-date version of the keyspace.
 
-## Lock Module
+## Lock Module (*Deprecated*)
 
 The lock module is used to serialize access to resources used by clients.
 Multiple clients can attempt to acquire a lock but only one can have it at a time.
 Once the lock is released, the next client waiting for the lock will receive it.
 
+**Warning:** This module is deprecated at v0.4. See [Modules][modules] for more details.
+
 
 ### Acquiring a Lock
 
@@ -990,10 +992,13 @@ If you specify a field other than `index` or `value` then you'll receive the fol
 ```
 
 
-## Leader Module
+## Leader Module (*Deprecated*)
 
 The leader module wraps the lock module to provide a simple interface for electing a single leader in a cluster.
 
+**Warning:** This module is deprecated at v0.4. See [Modules][modules] for more details.
+[modules]: https://github.com/coreos/etcd/blob/master/Documentation/modules.md
+
 
 ### Setting the Leader
 

+ 6 - 0
Documentation/modules.md

@@ -3,6 +3,12 @@
 etcd has a number of modules that are built on top of the core etcd API.
 These modules provide things like dashboards, locks and leader election.
 
+**Warning**: Modules are deprecated from v0.4 until we have a solid base we can apply them back onto.
+For now, we are choosing to focus on raft algorithm and core etcd to make sure that it works correctly and fast.
+And it is time consuming to maintain these modules in this period, given that etcd's API changes from time to time.
+Moreover, the lock module has some unfixed bugs, which may mislead users.
+But we also notice that these modules are popular and useful, and plan to add them back with full functionality as soon as possible.
+
 ### Dashboard
 
 An HTML dashboard can be found at `http://127.0.0.1:4001/mod/dashboard/`.

+ 3 - 1
server/server.go

@@ -207,7 +207,9 @@ func (s *Server) HTTPHandler() http.Handler {
 	s.handleFunc(router, "/version", s.GetVersionHandler).Methods("GET")
 	s.installV1(router)
 	s.installV2(router)
-	s.installMod(router)
+	// Mod is deprecated temporariy due to its unstable state.
+	// It would be added back later.
+	// s.installMod(router)
 
 	if s.trace {
 		s.installDebug(router)

+ 3 - 2
test.sh

@@ -23,8 +23,9 @@ go test -v ./server/v1/tests -race
 go test -i ./server/v2/tests
 go test -v ./server/v2/tests -race
 
-go test -i ./mod/lock/v2/tests
-go test -v ./mod/lock/v2/tests
+# Mod is deprecated temporarily.
+# go test -i ./mod/lock/v2/tests
+# go test -v ./mod/lock/v2/tests
 
 go test -i ./pkg/btrfs
 go test -v ./pkg/btrfs