Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-20Correct test job imagespo-fix-ci-git-222Paul Okstad
2020-05-20Correct Git version for CI testsPaul Okstad
2020-05-20Merge branch 'jc-set-default-custom-hooks-dir' into 'master'Paul Okstad
Set default value for custom hooks directory See merge request gitlab-org/gitaly!2184
2020-05-20Merge branch 'pks-2pc-cleanups' into 'master'John Cai
Follow-ups for transactions See merge request gitlab-org/gitaly!2188
2020-05-20metadata: avoid re-using `os.ErrNotFound`Patrick Steinhardt
When either transaction or Praefect sevrer metadata cannot be extracted from the gRPC stream or environment, we currently return an `os.ErrNotFound` error. Its error message is quite misleading in this context, as it says "file does not exist" and there are no files in play at all. Let's improve this by using our own custom data types instead of `os.ErrNotFound`.
2020-05-20Merge branch 'ps-group-for-storage-info' into 'master'John Cai
Include Praefect usage in the usage ping See merge request gitlab-org/gitaly!2180
2020-05-20Set default value for custom hooks directoryJohn Cai
2020-05-19Merge branch 'upgrade-activesupport-6-0-3' into 'master'Zeger-Jan van de Weg
Update gems to match those in the Rails repo See merge request gitlab-org/gitaly!2144
2020-05-19Merge branch 'ps-read-dist-doc' into 'master'Zeger-Jan van de Weg
Praefect: horizontal scaling of a single shard MVC See merge request gitlab-org/gitaly!2189
2020-05-19Praefect: horizontal scaling of a single shard MVCPavlo Strokov
Documenting usage of `distributed_reads_enabled` with description of read distribution feature. Part of https://gitlab.com/gitlab-org/gitaly/-/issues/2650
2020-05-19Include Praefect usage in the usage pingPavlo Strokov
With introduction of praefect between GitLab and Gitaly it is required to include info about Praefect into Usage Ping. As Praefect is a transparent proxy between two listed above the new parameter is added to the response and will be filled by the Praefect after gathering info from Gitalies behind it. Later it will be used to calculate the number of storages to send statistics into Usage Ping. Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/2664
2020-05-19Update Rails gems to 6.0.3.1Heinrich Lee Yu
2020-05-19Merge branch 'jc-fix-git-alt-dirs' into 'master'Sami Hiltunen
Do not relativize GitObjectDirectory and GitAlternateObjectDirectories See merge request gitlab-org/gitaly!2176
2020-05-19Update VERSION to 13.0.0-rc2v13.0.0-rc2GitLab Release Tools Bot
2020-05-19Merge branch 'pks-2pc-single-transaction' into 'master'Patrick Steinhardt
Single-node transactions via pre-receive hook See merge request gitlab-org/gitaly!2147
2020-05-19hooks: Let pre-receive hook reach out to the transaction managerPatrick Steinhardt
In order to allow for strong consistency for Git reference updates, Gitaly nodes are expected to perform voting on the updates they intend to perform. While the server side for this exists already in form of the transaction manager and reference transaction service, the client-side is not yet wired up. In this first iteration, we implement the client side by reaching out to the reference transaction service from the pre-receive hook. While this won't yet catch all reference updates but only those performed as the result of git-push(1), it serves as a first minimally viable demonstration that a two-phase commit via Git hooks works. One interesting bit is that starting the transaction is _not_ guarded by a feature flag on the hook side, but only by presence of environment variables that carry transaction information. As this environment variable is only set in case Praefect has registered a transaction, which in turn only happens if the "reference_transactions" feature flag is set, we are still guarded. Further note the hook is only implemented in the Go hook service, which is in turn guarded by the "hooks_rpc" feature flag. As the work is currently of experimental nature, it's deemed as a nice proof of concept for the Go hooks RPC.
2020-05-19hooks: Make transaction information available via environmentPatrick Steinhardt
Now that we have transaction information passed through to us by Praefect in case the reference transaction feature flag is turned on, we need to pass it on to the Git hooks. Again, we follow the same approach as chosen for the Praefect server connection information to make data available via the environment of the Git hook.
2020-05-19praefect: Pass environment to `PraefectFromEnv()`Patrick Steinhardt
When wiring up `PraefectFromEnv()` in the hooks service later, we're not going to look up keys from the OS environment but instead from the array of environment variables passed to us via gRPC. As a preparatory step, this commit thus converts `PraefectFromEnv()` to get an array of environment variables as parameters to make it more flexible.
2020-05-18Merge branch 'sh-bump-activesupport-6.0.3' into 'master'John Cai
Update activesupport to v6.0.3 and gitlab-labkit to v0.12.0 See merge request gitlab-org/gitaly!2178
2020-05-18Update activesupport to v6.0.3 and gitlab-labkit to v0.12.0Stan Hu
We upgraded to Rails 6.0.3 in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31307, so update the gitaly-ruby gems to match in order to save some space.
2020-05-18Do not relativize GitObjectDirectory and GitAlternateObjectDirectoriesJohn Cai
2020-05-18Merge branch 'ps-reads-distribution' into 'master'Pavlo Strokov
Praefect: horizontal scaling of a single shard MVC Closes #2650 See merge request gitlab-org/gitaly!2162
2020-05-18Praefect: horizontal scaling of a single shard MVCPavlo Strokov
Random distribution of reads to up to date gitaly nodes. Up to date status of node verified based on the state of the replication queue. Backoff strategy is to use primary node if there are no up to date secondaries or an error occurred. This feature can be enabled with 'distribution_of_reads_enabled'. Closes: https://gitlab.com/gitlab-org/gitaly/-/issues/2650
2020-05-18Merge branch 'smh-ignore-demoted' into 'master'Sami Hiltunen
Fix re-electing demoted primaries See merge request gitlab-org/gitaly!2181
2020-05-18Merge branch 'smh-config-read-only-flag' into 'master'Sami Hiltunen
Replace read-only feature flag with a config toggle See merge request gitlab-org/gitaly!2173
2020-05-18fix re-electing demoted primariesSami Hiltunen
Fixes a bug where the demoted status of a primary is not considered when checking whether the new primary candidate is already elected as the primary. This caused a problem where Praefect was not able to re-elect a demoted primary as it was considered already elected.
2020-05-18Replace read-only feature flag with a config toggleSami Hiltunen
Removes the feature-flag controlling read-only enforcement. The feature flag only controlled enforcement in RPCs, making future upgrades more difficult as some storages could already be in read-only mode when the feature flag is removed. The feature flag is replaced with a config toggle that also controls whether the storages should be set read-only on a failover.
2020-05-18Merge branch 'smh-tidy-gomod' into 'master'Pavlo Strokov
Add missing checksum to go.sum See merge request gitlab-org/gitaly!2179
2020-05-18add missing checksum to go.sumSami Hiltunen
9738045a3 added a dependency to gitlab-shell@v1.9.8. This version of gitlab-shell in turn depends on gitaly@v1.68.0 which depends on cloudflare/tableflip@v0.0.0-20190329062924-8392f1641731. This commit adds the missing checksum for that specific revision of tableflip.
2020-05-15Update CHANGELOG.md for 12.10.6GitLab Release Tools Bot
[ci skip]
2020-05-15Merge branch 'po-refactor-praefect-test-options' into 'master'Paul Okstad
Refactor Praefect test server helpers See merge request gitlab-org/gitaly!2135
2020-05-15Refactor Praefect test server helpersPaul Okstad
2020-05-15Merge branch 'jc-add-gitlab-access' into 'master'John Cai
Add gitlab api access See merge request gitlab-org/gitaly!2156
2020-05-15Merge branch 'jc-use-SOCKETREUSE' into 'master'John Cai
Allow port reuse in tableflip Closes #2734 See merge request gitlab-org/gitaly!2175
2020-05-15Add gitlab api accessJohn Cai
2020-05-15Merge branch 'smh-fix-marshaling' into 'master'Sami Hiltunen
Write out enable-writes response correctly See merge request gitlab-org/gitaly!2172
2020-05-15write out enable-writes response correctlySami Hiltunen
Currently EnableWrites RPC is writing out a nil response, which in turn returns an error to the client. This fixes the problem by writing out an empty answer when there is no error.
2020-05-15Merge branch 'pks-2pc-metrics' into 'master'Patrick Steinhardt
Metrics and improved logging for the transaction manager See merge request gitlab-org/gitaly!2165
2020-05-15praefect: Wire up transaction metricsPatrick Steinhardt
Now that the transaction manager has a set of metrics, we need to wire them up in Praefect. Let's do so.
2020-05-15transactions: Implement metricsPatrick Steinhardt
We currently have no metrics in the transaction manager, making it hard to estimate how many transaction succeed, how many fail and how long a node has to wait until a quorum was reached and the transaction is committed. This commit thus adds two metrics, one to count the number of registered, started, invalid and committed transactions and one to measure the delay between start and finish of the voting process.
2020-05-15transactions: Use finer-grained lockingPatrick Steinhardt
We currently lock the complete transaction manager during the whole lifetime of `mgr.StartTransaction()`, even though we only need the lock in a single place where we access the map of transactions. Let's thus reduce the scope of the lock to only guard the map access to improve efficiency.
2020-05-15transaction: Add "node" field when logging committed transactionsPatrick Steinhardt
The log message in case a transaction is committed is missing the "node" field right now. In case we ever decide we want to enable transactions in case a quorum was reached, then a subset of nodes will commit the transaction while another subset will abort it. Thus, having the "node" field logged in such a case may help quite a lot to see what's going on.
2020-05-15transactions: Log error casesPatrick Steinhardt
While we already log a transaction that is being started as well as a successful transaction, we do not yet any error cases. Refactor the code to put verification of transactions into its own function to unify all current error cases into a single path and log any returned errors.
2020-05-15Merge branch 'jc-support-bindir-in-makefile' into 'master'Patrick Steinhardt
Support bindir in Makefile Closes gitlab#213467 See merge request gitlab-org/gitaly!2167
2020-05-15Merge branch 'fix_subcommand_logging' into 'master'John Cai
Configure logging before running sub-commands Closes #2500 See merge request gitlab-org/gitaly!2169
2020-05-15Allow socket reuse in tableflipJohn Cai
2020-05-14Support bindir in MakefileJohn Cai
2020-05-14Merge branch 'ps-sql-elector-multi-virtual-storages' into 'master'Pavlo Strokov
Praefect: primary election must support multi virtual storages See merge request gitlab-org/gitaly!2170
2020-05-14Praefect: primary election must support multi virtual storagesPavlo Strokov
Election of the new primary node must take into account relation of the node to the proper virtual storage. To speed up SQL operations index were introduced based on 'virtual_storage' and 'target_node_storage' values. As an addition down migration was fixed to remove new type.
2020-05-14Merge branch 'smh-fix-lint-errors' into 'master'Pavlo Strokov
Remove unnecessary return clause causing lint failures See merge request gitlab-org/gitaly!2161