Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
yuxiaobo 867043971b add license in /go file
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-10-21 23:25:43 +08:00
Sugu Sougoumarane 411fba0f73 topo: fix obscure topo error messages
Topo error messages were obscure because they were not
reporting the node they were failing. The fix is extensive
because many places check for error strings to identify
specific types of error.

To address this, the topo errors have been converted to
also contain a code, and convenience functions are used
to check for error types. This allows the error string
to contain more information.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2018-06-08 21:59:25 -07:00
Anthony Yeh 6914580ad5
Rewrite imports to new custom URL.
This commit consists only of the changes from running the following:

```
find go -name '*.go' | xargs -n 10 -- sed -i -r -e \
  's,"github.com/youtube/vitess/go/,"vitess.io/vitess/go/,'
```
2018-02-27 12:00:33 -08:00
Alain Jobart bfc8525887 Filling in DirEntry.Type and Ephemeral for topo.
And testing it. Supports Ephemeral for election and lock path,
with unit tests.
2017-12-13 06:54:13 -08:00
Alain Jobart cecd635d99 topo.Conn.ListDir now returns []DirEntry.
So far, only name is populated. Will work on the rest next.
2017-12-13 06:54:13 -08:00
Alain Jobart 29f8036ee6 Moving the topo CellMap into topo package.
This is the big refactor:

* each implementation used to have a cell map. Now it's in the topo
package, and the implementations only provide a Conn (that connects
to a topo server), and a Factory (that creates Conn objects).

* the Tee implementation now just creates TeeConn objects.

* the MemoryTopo is still a single map, each Conn just uses a sub-part
of the map.

BUG=30274258
2017-11-29 20:57:37 -08:00
Alain Jobart f481b8da3a Replacing topo.Server with *topo.Server.
Next the topo.Server object is going to get the Cell map, so it needs to
be passed by pointer.
2017-11-29 07:16:39 -08:00
Sugu Sougoumarane 7af23e1dde license: BSD->Apache v2.0
Please refer to #2694 and #2670 for motivation and reasoning for
this change.

I've tried to follow best practice in inserting the copyright
headers. In other open source projects, not all files carry
the notice. For example documentation doesn't. I've followed
similar ground rules.

I did not change the php because there is a separate LICENSE
file there by Pixel Federation. We'll first need to notify
them our intent before changing anything there.

As for the presubmit check, it's going to be non-trivial
because of the number of exceptions, like file types,
directories and generated code. So, it will have to be
a separate project.
2017-05-06 00:38:56 -07:00
Alain Jobart b60ce6a388 Documenting and fixing all topo file paths.
They need to all be relative to each cell root.
2017-01-03 09:46:38 -08:00
Alain Jobart 9c1edb6cbd Topology refactor: adding zk2 topology.
- Introducing topodata.CellInfo. Stored in the global topology server, it
describes a connection to a topology server for a cell. It has both a
server address and a root directory to use. Also adding vtctl commands
to deal with it. Existing zk and etcd implementations ignore these flags
for now.

- Now passing toplevel server address and root as generic topology
parameters. And using a topo server factory method.

- Changing the topo server registration to use a Factory method. It
creates a topology server implementation with a server address and a
root path. Existing zk and etcd implementations ignore these flags for
now.

- adding a zk2 topology implementation. It doesn't use any of the go/zk
code, and allows the specification of a root directory for both the
global cell, and each individual cell. It also is using a different
directory structure, consistent with what we want all new topo
implementations to use. And it stores the data as protobuf, not json.

- deprecating the legacy 'zookeeper' implementation. Adding instructions
to migrate from old server style to new server style.

- removing old janitor code, been replaced by topo validator workflow.

- Using a more generic vtctld topo explorer, will use it in all servers
soon.

- Fixing the ZK command line to decode protos and use new connection
library.

- topo2topo now also copies VSchema.
2016-12-15 16:40:53 -08:00
Alain Jobart 869b83b73c First version of Workflow object.
In order to do that, I had to:
- Adding File/Dir APIs to topo.Backend.
- Implementing them for all flavors: memorytopo, zk, etcd, tee.
  None of the backward compatible code is there yet,
  so these can only be used for new objects.
- Adding corresponding unit tests.
- Fixing a few fake etcd-specific bugs.

Also now using CancelFunc for all topo watches.
2016-08-26 17:02:30 -07:00