Commit Graph

18 Commits (805959833200bbb769d9b02ef443d478a48da766)

Author SHA1 Message Date
Yicheng Qin ad4f231b40 Revert "server: standby exits when detecting v2 is running"
This reverts commit ebb8d781b5.
2015-03-27 16:04:40 -07:00
Yicheng Qin ebb8d781b5 server: standby exits when detecting v2 is running 2015-01-29 16:26:47 -08:00
Yicheng Qin a884f2a18a Merge pull request #881 from unihorn/111
standby server: save Running info correctly
2014-07-24 17:29:25 -07:00
Yicheng Qin c00594e680 server: fix timer leak 2014-07-21 14:23:52 -07:00
Yicheng Qin f7854c4ab9 standby server: save Running info correctly
Running should be true when Start, and set to false when switching to
the other mode.
2014-07-08 08:29:17 -07:00
Yicheng Qin d7768635fd fix(server): set joinIndex when recovered 2014-05-31 10:03:39 -07:00
Yicheng Qin 4bebb538eb fix(standby_server): able to join the cluster containing itself
Standby server will switch to peer server if it finds that
it has been contained in the cluster.
2014-05-30 14:03:49 -07:00
Yicheng Qin 84f71b6c87 chore(standby_server): remove error return
because standby server should be started in best efforts.
2014-05-16 18:07:49 -04:00
Yicheng Qin 71679bcf56 feat(standby_server): make atomic move for file
to avoid the risk of writing out a corrupted file.
2014-05-16 01:00:07 -04:00
Yicheng Qin a824be4c14 feat(standby_server): save/load Running into disk 2014-05-16 00:10:15 -04:00
Yicheng Qin 35cc81e22f feat(standby_server): save/load syncInterval to disk 2014-05-15 23:57:58 -04:00
Yicheng Qin 716496ec42 chore(standby_server): still sleep for the first time 2014-05-15 23:18:59 -04:00
Yicheng Qin b7d9fdbd39 feat(standby_server): write cluster info to disk
For better fault tolerance and availability.
2014-05-15 07:47:15 -04:00
Yicheng Qin 851026362a chore(standby_server): let syncInterval represent in second unit
This is done to keep consistency with other namings.
2014-05-14 10:13:05 -04:00
Yicheng Qin f6591b95c7 chore(standby): minor changes based on comments 2014-05-13 22:19:52 -04:00
Yicheng Qin c0027bfc78 feat(cluster_config): change field from int to float64
This is modified for better flexibility, especially for testing.
2014-05-12 22:42:18 -04:00
Yicheng Qin 6d4f018887 chore(cluster_config): rename SyncClusterInterval to SyncInterval
for better naming
2014-05-09 13:28:21 -07:00
Yicheng Qin baadf63912 feat: implement standby mode
Change log:
1. PeerServer
- estimate initial mode from its log through removedInLog variable
- refactor FindCluster to return the estimation
- refactor Start to call FindCluster explicitly
- move raftServer start and cluster init from FindCluster to Start
- remove stopNotify from PeerServer because it is not used anymore
2. Etcd
- refactor Run logic to fit the specification
3. ClusterConfig
- rename promoteDelay to removeDelay for better naming
- add SyncClusterInterval field to ClusterConfig
- commit command to set default cluster config when cluster is created
- store cluster config info into key space for consistency
- reload cluster config when reboot
4. add StandbyServer
5. Error
- remove unused EcodePromoteError
2014-05-09 01:56:55 -07:00