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

10982 Коммитов

Автор SHA1 Сообщение Дата
Alain Jobart 0972cfab04 Roadmap doc.
Includes web site publishing.
2016-11-08 07:07:13 -08:00
sougou 1f5ba0d1e4 Merge pull request #2224 from sougou/2pc
2pc: commit failure handling
2016-11-07 16:30:42 -08:00
Sugu Sougoumarane 323bcdfd04 2pc: addres code review comments 2016-11-07 14:22:41 -08:00
Erez Louidor 973b258381 Merge pull request #2169 from erzel/removing_splitquery_v2_plumbing
Removing SplitQuery plumbing and renaming SplitQueryV2 to SplitQuery
2016-11-07 10:17:46 -08:00
Michael Berlin 8901fa0473 Merge pull request #2225 from michael-berlin/doc_contributing
vitess.io: Add new section "Contributing".
2016-11-07 10:16:30 -08:00
Michael Berlin ecc69faffa publish site Sun Nov 6 21:48:34 PST 2016 2016-11-07 10:15:28 -08:00
Michael Berlin fd4ebcd815 vitess.io: Add new section "Contributing".
It explains in detail:
- how to learn more about Go
- how to learn more about Vitess
- how our GitHub workflow works
- how we handle code reviews
2016-11-07 10:15:28 -08:00
Michael Berlin 272e799c26 doc: Sharding.md: Clarify that sharding is orthogonal to replication.
Also: Indent one line correctly. Otherwise the syntax highlighting in
"Kate" shows it wrong.
2016-11-07 10:15:28 -08:00
Michael Berlin 867f824379 Merge pull request #2223 from michael-berlin/cleanup_website_scripts
Simplify the process to publish the website.
2016-11-07 10:10:56 -08:00
Alain Jobart ba7402a8bb Merge pull request #2226 from michael-berlin/go_grpc_update
Update vendored gRPC Go to 1.0.4.
2016-11-07 07:07:50 -08:00
Alain Jobart a2cd82037a Merge pull request #2228 from youtube/vitess_2227
Fix for build failure on OS X, vitess issue 2227
2016-11-07 07:05:58 -08:00
Ashudeep Sharma e8135d08d6 Fix for build failure on OS X, vitess issue 2227 2016-11-07 14:30:44 +05:30
Michael Berlin 892298c067 proto: Regenerate Go protobuf files to be compatible with gRPC Go 1.0.4. 2016-11-06 22:07:22 -08:00
Michael Berlin ba6ca6083a vendor: Update protoc-gen-go to HEAD.
Used command:

$ govendor fetch github.com/golang/protobuf/protoc-gen-go/...
2016-11-06 22:06:36 -08:00
Michael Berlin 6d84918b2a vendor: Update Go grpc to 1.0.4.
Our Kubernetes instructions use "go get" to compile vtctlclient.

Since our generated gRPC services are no longer compatible with the latest gRPC version, we need to update it.

See: https://github.com/youtube/vitess/issues/1811#issuecomment-258740349

I ran the following command to update the dependency:

$ govendor fetch google.golang.org/grpc/...@=v1.0.4
2016-11-06 22:04:09 -08:00
Sugu Sougoumarane 80275a8f76 2pc: commit failure handling
A prepared commit is not supposed to fail. But if it does, we have
to do our best effort to alert on this. This PR makes the necessary
changes for it:
* If a commit fails, that dtid is added to a list of failed commits.
  A subsequent attempt to commit the same dtid will fail again. This
  way, someone who retries won't accidentally get a succeeded message.
* A failed commit will also mark the transaction as failed in the redo
  log. If a reparent happens, then that such dtids are repopulated in
  the failed list. This will ensure that the info about the failed
  commit survives reparents.
* A failed commit will also increment InternalErrors, which can be
  tied to an alert.
* The marking of a transaction as failed could itself fail. At this
  point, we've already raised an alert. So, there's not much we can
  do beyond logging the failure.
* In the prep pool implementation, the failed list is called 'reserved'
  because it also holds transactions while they're being commmitted.
  This will prevent two racing commits from stepping over each other.
2016-11-06 18:26:13 -08:00
Michael Berlin 3fd7963417 vitess.io: Remove symlink for README.md in _includes dir because it is no longer required. 2016-11-05 21:55:57 -07:00
Michael Berlin 36161cb052 docs: Add a README.md file to explain the purpose of the directory. 2016-11-05 21:55:57 -07:00
Michael Berlin f61c6a4312 publish site Sat Nov 5 21:55:18 PDT 2016 2016-11-05 21:55:18 -07:00
Michael Berlin f08cb2f52a vitess.io: Change publish-site.sh to create the new website pages in the docs/ directory.
This greatly simplifies the process compared to the old process where we
had to switch branches (master => gh-pages) in between and move files
around.
2016-11-05 21:55:10 -07:00
Michael Berlin 038782900b docs: Add a copy of the "gh-pages" branch in the "docs" subdirectory.
We'll switch serving vitess.io:
- before: from the gh-pages branch
- now: from the docs directory out of the master branch

This way it is much easier to update the website:
- no switching between branches required
- no untracked files get in our way in the gh-pages branch
- generated pages can be written in place and do not have to be moved around
- website can be updated and published in the same pull request
2016-11-05 21:55:10 -07:00
Michael Berlin 54454b1efb gitignore: Ignore preview-vitess.io only if it's in the root folder.
Copies in other directories are a bug and should be fixed.
2016-11-05 21:55:10 -07:00
Michael Berlin fd58adbd2b vitess.io: Stop publishing /doc/*.md files on vitess.io which are NOT already listed in the menu.
For example, http://vitess.io/doc/TopologyService/ was published but
never reachable from any navigation entry.

Stopping to publish /doc/ pages will also avoid duplication e.g.
- http://vitess.io/doc/Reparenting/ vs.
- http://vitess.io/user-guide/reparenting.html

Instead, to publish a page, an explicit *.md file must be created in /vitess.io and it must be linked in the navigation file vitess.io/_includes/left-nav-menu.html.

I did this for TopologyService.md and created vitess.io/user-guide/topology-service.md because it is a relevant page which is linked from several other pages.

This change also allows us to remove the script replace_doc_link.py. It
replaced github.com links (e.g.
https://github.com/youtube/vitess/blob/master/doc/TopologyService.md)
with a vitess.io link. Since we're always using absolute links anyway
(e.g. /user-guide/topology-service.html), this is no longer necessary.

By getting rid of the tool and the extra doc files (published under
_post), we can also avoid creating a copy when
running preview-site.sh. This way, Jekyll can watch the original folder
and automatically generate pages when something changes.

To make this work, I had to add the following symlinks:
vitess.io/_includes/doc
vitess.io/_includes/index.md
vitess.io/_includes/README.md

After this change, the following files in doc/ are not published on vitess.io:

- LifeOfAQuery.md
- Monitoring.md
- Production.md
- ReplicationStreamTiming.md
- TestingOnARamDisk.md
- TwoPhaseCommit.md
- V3HighLevelDesign.md
- V3VindexDesign.md
- Vision.md
- VTGateV3Features.md

Except for TestingOnARamDisk.md they also haven't been visible on vitess.io before. That's because no other page did link to them.
2016-11-05 21:55:06 -07:00
Michael Berlin 52c4dd8684 doc: Add missing newline before enumeration. 2016-11-05 18:15:18 -07:00
Pavel Ivanov 79aab0177b Change the way modification of Node and broadcasting of changes works. (#2219)
This change clearly separates the data owned by user of workflow API and data
owned by the workflow library itself. After this separation user can change the
data owned by it at any time and in any way it wants, but then it will need to
call the BroadcastChanges() method to copy that data into workflow library and
broadcast it to browsers.
This eliminates Node.Modify() method which was a pretty awkward callback-based
method of modifying the Node data. It highly limited what the API users could
do, and besides that it would race with any other Node changes that could be
done at the same time. This also fixes the problem when a Node couldn't be
updated in the UI without updating its children as well. Now that can be done if
BroadcastChanges() method is called with updateChildren = false.
2016-11-04 23:31:42 -07:00
Pavel Ivanov cac9ce496f Some cleanup on the Node-related Go<->javascript API. (#2221)
- Make the first value of enums (the one that is equal to 0) to be the unknown
  one, so that it was considered a programming error.
- Remove "omitempty" tag from fields where change from some value to empty value
  must be passed in an update to the web UI.
- Add "omitempty" to Children because that's an important special use case.
- Modify javascript to assume that name, state, style and message of an action
  is always there.
- Modify javascript to work when 'children' value was not received.
2016-11-04 23:02:18 -07:00
Michael Berlin ab58e1113e Merge pull request #2218 from michael-berlin/fix_vtctld_nil_dereference
vtctld: Do not access embedded proto if err != nil.
2016-11-04 18:25:48 -07:00
sougou 82cb07de1c b/32560113: Remove false alarm (#2220)
RollbackNonBusy gets called if a tablet was externally reparented.
If so, it's normal for transactions to still be outstanding. So,
they should be simply rolled back without raising any alarms,
2016-11-04 15:32:04 -07:00
Erez Louidor 75c2397155 Removing SplitQuery plumbing and renaming SplitQueryV2 to SplitQuery 2016-11-04 15:09:55 -07:00
Pavel Ivanov 55be023434 Fix parsing of actions when updating Node in workflow UI. (#2215)
It looks like something has changed recently and now when WorkflowManager
encodes Node into json it behaves similar to proto3: when 'state' and 'style'
in an action have enum value equal to 0, it's getting omitted from the resulting
json. That caused the javascript code to skip adding the Action object to the
Node. I'm fixing the javascript to account for that and consider missing 'state'
and 'style' as being equal to 0.
2016-11-04 13:59:47 -07:00
Michael Berlin cef4265e4a vtctld: Remove trailing whitespace in api_test.go. 2016-11-04 12:12:59 -07:00
Michael Berlin df8d1f1f2f vtctld: Do not access embedded proto if err != nil.
Otherwise, we may dereference a nil pointer.

I've added an error check to all places which were originally changed in commit 65cfdfa61c.

Fixes https://github.com/youtube/vitess/issues/2217
2016-11-04 12:05:05 -07:00
Alain Jobart a26434d0c6 Merge pull request #2214 from alainjobart/bind
Revert "Merge pull request #2191 from alainjobart/bind"
2016-11-04 11:48:55 -07:00
Alain Jobart 299e3a2e4c Revert "Merge pull request #2191 from alainjobart/bind"
This reverts commit 38749981ea, reversing
changes made to 189b5b455d.
2016-11-04 10:48:25 -07:00
Alain Jobart d9f3818c22 Merge pull request #2216 from alainjobart/maria
Upgrading MariaDB version.
2016-11-04 10:47:47 -07:00
Alain Jobart c7dba94665 Upgrading MariaDB version. 2016-11-04 10:36:46 -07:00
Alain Jobart 38749981ea Merge pull request #2191 from alainjobart/bind
Bind variables optimizations.
2016-11-04 09:45:35 -07:00
Alain Jobart 189b5b455d Merge pull request #2202 from alainjobart/semi
Enabling / Disabling semi-sync on ChangeType.
2016-11-04 09:44:03 -07:00
Alain Jobart a52629fb4f Now using querypb.BindVariable directly.
We added support for them everywhere. This makes the gRPC layer just
pass in the proto version, and changes all the unit tests.
2016-11-03 14:02:01 -07:00
Alain Jobart aa1b9f7fbf Merge pull request #2212 from alainjobart/bind2
Adding support for proto bind variables.
2016-11-03 13:57:23 -07:00
Alain Jobart f1e20781d7 Merge pull request #2203 from alainjobart/topo
Making DeleteShard more resilient.
2016-11-03 13:56:30 -07:00
Alain Jobart 9de1a626cd Enabling / Disabling semi-sync on ChangeType.
Also fixing related semi-sync problems:
* restarting replication if needed in ChangeType.
* fixing a bug in backup.by that would make it not remove the
right directories if -k is specified.
* fixing tabletmanager.py test:
  * we were setting up a master and a rdonly only in one shard. In that
    scenario, have to disable semi-sync, otherwise we can't ack.
  * InitSlave called on an old master was initializing semi-sync using the
    master type, and that is wrong (can't commit anything, no slave).
    Using replica as a type for this case. Also adding a ChangeType to
    REPLICA for the tablet in that case, with test.
2016-11-03 11:07:20 -07:00
Alain Jobart 84d82da92a Making DeleteShard more resilient.
If we can't find a ShardReplication object, fallback to reading all the
tablets in a cell (canonical tablet records) to find potential matches.
Also adding a unit test for that logic.

And adding a new 'even_if_serving' flag to DeleteShard. That way we
won't delete a serving shard by accident.
2016-11-03 10:44:52 -07:00
Alain Jobart 5e1a7434e4 Adding support for proto bind variables.
Note we do not use that support yet. It will be enabled in a separate
commit. Right now, we just handle querypb.BindVariable as a type in the
map[string]interface used with bind variables.

In the process, handling a bunch more types and adding tests for the
handling functions:
- Simplifying bindVariableToValue.
- Making vindexes.getNumber and getBytes better, with more tests.
- Also adding more types and test cases for query rules.
2016-11-03 08:00:49 -07:00
Michael Berlin ac34804eab Merge pull request #2208 from michael-berlin/docker_makefile_lite
Update scripts after building a recent "lite" Docker image.
2016-11-02 16:12:19 -07:00
Michael Berlin 22fcc12703 docker: lite image: Copy only the "app" directory for vtctld2.
This reduces the size of the lite image from 281 MB to 215 MB.
2016-11-02 15:42:44 -07:00
Michael Berlin e0ea86acc2 Makefile: Add target "docker_bootstrap_pull".
This simplifies downloading all bootstrap images at once.

I've also improved the log message for building and pushing the bootstrap image.
2016-11-02 15:42:44 -07:00
Michael Berlin 81ee97c5da Makefile: Move "docker_base_mariadb" target to be consistent with the respective lite target. 2016-11-02 15:42:44 -07:00
Michael Berlin 8c8ab672b3 Makefile: Add comment to explain different tags of the base and lite images. 2016-11-02 15:42:44 -07:00
Michael Berlin 734ad80df5 docker/lite: Remove unnecessary build and test dependencies from the image. 2016-11-02 15:42:44 -07:00