* stable-2.14:
Extend MigrateAccountPatchReviewDb summary with stats
Print progress info from the MigrateAccountPatchReviewDb program
Change-Id: Ic3e1e4cb7f35b73b3e1564dc830ec2b1cf63b13e
Add the following information:
1. how many rows were migrated
2. how much time it took
3. what was migration speed (rows per/sec)
So that it is more consistent with Reindex operation output.
Change-Id: If49da15ed9806f2b0dd2e63911445a55785a5cfb
NoteDb is no longer experimental in the sense that we are telling people
to migrate their production data. Give it an additional boost by making
it the default.
Change-Id: I4e6da109fccb7b93cbd7a773de1e8a96f145ff1f
* stable-2.14:
Fix typo in waitTimeout configuration and clarify its use
Fix LogFileCompressor scheduling
SshDaemon: introduce sshd.waitTimeout to set WAIT_FOR_SPACE_TIMEOUT
Change-Id: Ia205aae808e4041d818f3d397b112e81642b5388
Since: I1e665848cd7cd5f93628db97c0af17900d243f9d initial delay for the
scheduled task was not being calculated correctly, leading to the task
initially being run much later than expected.
Change-Id: I88dc9b10785b15f46eb21463a48e49d4416cd651
* stable-2.14:
Increase the value of GERRIT_FDS parameter
Fix invalid operator invalidating web session
Change-Id: Ifc9403f870f65f19e2f9d6c42a9754bbb07201bf
Since change Iff64365630 group members are now stored in the group
index. Hence after adding a group member the group must be reindexed.
Since the group reindex was skipped the membership of the initial admin
user in the Administrators group was not effective until a next reindex
of the group occurred.
Bug: Issue 7358
Change-Id: Idb5b91a92c682f03d74a5327ec96442f63999d14
Signed-off-by: Edwin Kempin <ekempin@google.com>
When star labels are updated a refs/starred-changes/* branch in the
All-Users repository is updated. For this update we must trigger a
GitReferenceUpdated event, so that e.g. this ref update gets replicated
to Gerrit slaves.
For this GitRefUpdatedEvent we don't want to reindex the account since
star labels are not stored in the account index (but in the change
index and StarredChangesUtil already takes care to reindex the change).
Change-Id: I1d7fccfdeee603297e0b4e79393621b5ab57547a
Signed-off-by: Edwin Kempin <ekempin@google.com>
This allows to replicate updates to the refs/sequences/* branches in
All-Users and All-Projects. Replicating these refs is not needed for
Gerrit slaves (since they do not create new accounts or changes) but
replicating these refs may be wanted if the replication target is a
Gerrit backup server.
Change-Id: Ib1d21a646d89b2e774dc9d50574eb990b8d79ece
Signed-off-by: Edwin Kempin <ekempin@google.com>
When external IDs are updated the refs/meta/external-ids branch in the
All-Users repository is updated. For this update we must trigger a
GitReferenceUpdated event, so that e.g. this ref update gets replicated
to Gerrit slaves.
PostGpgKeys and GpgKeys are now injected as provider into
GpgApiAdapterImpl to avoid a circular Guice dependency:
GitReferenceUpdated needs EventUtil which needs ChangeJson.Factory.
ChangeJson uses GpgApiAdapter to find out if push certificates are
enabled and if yes to include the push certicates of the patch set
uploaders into RevisionInfo. This doesn't require PostGpgKeys and
GpgKeys. If PostGpgKeys would be injected without provider we would need
ExternalIdsUpdate.User to instantiate it which now needs
GitReferenceUpdated. Hence without injecting PostGpgKeys into
GpgApiAdapterImpl as a provider we would have a dependency circle.
Change-Id: Ia9c71d26669f24f20c659d82ae97ecfca6ab61c3
Signed-off-by: Edwin Kempin <ekempin@google.com>
GERRIT_FDS is set to double of core.packedGitOpenFiles, which is
not sufficient to account for the file descriptors used by Git LFS.
If Git LFS plugin is enabled triple the value instead of doubling it.
Note the value of core.packedGitOpenFiles also relates to the
packedGitLimit, which is why it is not suggested to simply increase
the configured value.
Change-Id: Ibdf4d03f91611cdaf20f1e5ab7cffd83c1a62831
Signed-Off-By: Eryk Szymanski <eryksz@gmail.com>
This job will perform scheduled sweeps of accounts registered in the
Gerrit to deactivate those which are reported as inactive by the auth
backend. This job is by default disabled. Currently, only the LDAP
implementation is covered.
Change-Id: I4ecdc08df477960f0e884d7e31e174ad6d47e6e0
As with auto-migration, this may be set either with a flag or a config
option. This means that NoteDbMigrator now has to modify multiple
"control" flags in the config that are not directly related to the
migration state.
Increase the heap size of the standalone tests, as it would otherwise
fail under bazel with "GC overhead limit exceeded". This implies there
is some kind of leak in the standalone sever test setup, but debugging
that is beyond the scope of this change.
Bug: Issue 7101
Change-Id: I36da7e49f5db7d095fde76e7d093e23125dffce3
Any uncaught exception was silently causing subsequent executions to be
suppressed.
Catch and log any exceptions so root cause could be identified and
subsequent execution are not suppressed.
Change-Id: Ide998eb1edf583b483b3ce4f06c5b3a5dd1288d8
Now that we have the group index, we can use it to look up groups by
AccountGroup.Id. This change is a prerequisite for migrating groups to
NoteDb.
When migrating changes from ReviewDb to NoteDb, the author for the
NoteDb commit is looked up from the account cache. Account lookups
include accessing details about groups which are now retrieved from the
group index. For this reason, the site program MigrateToNoteDb needs to
set up the indices to be able to run successfully.
Change-Id: I86f85b6e418f3cad2dbfeacbf57c9375923221e6
All callers of SubmitRuleEvaluator get AccountCache, Accounts and
Emails injected just to pass them to SubmitRuleEvaluator manually.
This commit adds a Factory to SubmitRuleEvaluator and migrates callers
to use the factory instead to remove boilerplate.
In addition, this commit moves the instantiation of ChangeControl from
the constructor closer to where it is needed to prevent the constructor
from throwing an OrmException.
Change-Id: I429e7a67e4f1a45be1cf2c2f05692661c086cabe
mysql-connector-java 6.x discontinues support for mysql versions anything
lower than 5.5, and it also adds support for Java 8.
Bug: Issue 6229
Change-Id: I73bf0fae98a1a845fd903bc056f89a716ecd521
* stable-2.14:
Fix rendering in documentation of LocalUsernamesToLowerCase
Consistently use toLowerCase() in ConsoleUI.readEnum
Change-Id: I38bbf228fb6a7a3a1962f54f98474d23739acc02
The list of supported options was converting enum names to lower case
but the input prompt didn't do the same for the default value.
Change-Id: I9d300572dea830480362e92c91a8eae679d2f954
This information may be used to answer support requests about why an
account is not found by the reviewer suggestion.
Change-Id: I0e88e05ca218dcd52028743c352ae6e4d6945ded
Signed-off-by: Edwin Kempin <ekempin@google.com>
ReindexAfterRefUpdate is not what we want at all; reindexing is handled
specially at the end of the process. This was probably a copy/paste
error.
Do bind GitRefUpdated to DISABLED, which may be what was intended here,
and even if not, is likely a good idea anyway.
Change-Id: I7785d02a6c5aa44fd4baa3f616044580ffff9a56
Accounts have been fully migrated to NoteDb. However inside of Google we
still have code that depends on the Accounts table. hence this table is
dropped only later by a follow-up change.
Change-Id: Ia32983e2877e3965561db7d264cf1d2b7b2e40c3
Signed-off-by: Edwin Kempin <ekempin@google.com>
To be able to tell whether an account is stale in the index we need to
record a state ID for each source that contributes to the account
document (user branch + external IDs). For the user branch we can record
its ref state (similar to how the change index records ref states / ref
state patterns for all refs that contribute to a change). For the
external IDs branch the ref state is not sufficient because it changes
whenever any external ID is updated and we don't want to detect all
accounts as stale after each external ID update. Hence for the external
IDs we record the IDs of the note blobs instead.
Change-Id: I7f0383cb46e461cc5158bf13f31d608a927bfd49
Signed-off-by: Edwin Kempin <ekempin@google.com>
So far, the datasource used to connect to the AccountPatchReviewStore
was using hard coded values for the pool connection settings. In high
traffic servers, those default values cause a bottleneck as the
transactions start to be queued when the max number of connections is
reached.
Add the possibility of specifying those values in the gerrit
configuration so they can be tailored to diverse needs.
Change-Id: I7d0cd1e2fe02cea3c5f78ef90398e9ac670a9a93
* stable-2.14:
Don't crash on empty diff selection
H2AccountPatchReviewStore: Factor out test store
JdbcAccountPatchReviewStore: Simplify module
Change-Id: Ic02d6bea5109cc2eb070808732e44232a93987cc