Update most documentation for NoteDb
Remove outdated references to ReviewDb. Where ambiguous terms like "database" are used, make sure they are still technically accurate, or else remove them. After this change, all documentation should be up to date with respect to the database backend, with the exception of note-db.txt itself. Change-Id: I7134087dc56070788e81ada6ac504b3c8fe84c4c
This commit is contained in:
parent
d7a86c7863
commit
ada289c6df
@ -28,9 +28,8 @@ _ssh_ -p <port> <host> _gerrit create-project_
|
|||||||
== DESCRIPTION
|
== DESCRIPTION
|
||||||
Creates a new bare Git repository under `gerrit.basePath`, using
|
Creates a new bare Git repository under `gerrit.basePath`, using
|
||||||
the project name supplied. The newly created repository is empty
|
the project name supplied. The newly created repository is empty
|
||||||
(has no commits), but is registered in the Gerrit database so that
|
(has no commits), and the initial content may either be uploaded for
|
||||||
the initial commit may be uploaded for review, or initial content
|
review, or pushed directly to a branch.
|
||||||
can be pushed directly into a branch.
|
|
||||||
|
|
||||||
If replication is enabled, this command also connects to each of
|
If replication is enabled, this command also connects to each of
|
||||||
the configured remote systems over SSH and uses command line git
|
the configured remote systems over SSH and uses command line git
|
||||||
|
@ -16,7 +16,7 @@ Clear an in-memory cache, forcing Gerrit to reconsult the ground
|
|||||||
truth when it needs the information again.
|
truth when it needs the information again.
|
||||||
|
|
||||||
Flushing a cache may be necessary if an administrator modifies
|
Flushing a cache may be necessary if an administrator modifies
|
||||||
database records directly in the database, rather than going through
|
NoteDb metadata directly in a repository, rather than going through
|
||||||
the Gerrit web interface.
|
the Gerrit web interface.
|
||||||
|
|
||||||
If no options are supplied, defaults to `--all`.
|
If no options are supplied, defaults to `--all`.
|
||||||
|
@ -71,7 +71,7 @@ link:cmd-ls-projects.html[gerrit ls-projects]::
|
|||||||
List projects visible to the caller.
|
List projects visible to the caller.
|
||||||
|
|
||||||
link:cmd-query.html[gerrit query]::
|
link:cmd-query.html[gerrit query]::
|
||||||
Query the change database.
|
Query the change search index.
|
||||||
|
|
||||||
'gerrit receive-pack'::
|
'gerrit receive-pack'::
|
||||||
'Deprecated alias for `git receive-pack`.'
|
'Deprecated alias for `git receive-pack`.'
|
||||||
|
@ -32,8 +32,8 @@ Administrators
|
|||||||
--user::
|
--user::
|
||||||
-u::
|
-u::
|
||||||
Required; User for which the visible refs should be listed. Gerrit
|
Required; User for which the visible refs should be listed. Gerrit
|
||||||
will query the database to find matching users, so the
|
will query the index to find matching users, so the full
|
||||||
full identity/name does not need to be specified.
|
identity/name does not need to be specified.
|
||||||
|
|
||||||
--only-refs-heads::
|
--only-refs-heads::
|
||||||
Only list the refs found under refs/heads/*
|
Only list the refs found under refs/heads/*
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
= gerrit query
|
= gerrit query
|
||||||
|
|
||||||
== NAME
|
== NAME
|
||||||
gerrit query - Query the change database
|
gerrit query - Query the change search index
|
||||||
|
|
||||||
== SYNOPSIS
|
== SYNOPSIS
|
||||||
[verse]
|
[verse]
|
||||||
@ -24,7 +24,7 @@ _ssh_ -p <port> <host> _gerrit query_
|
|||||||
|
|
||||||
== DESCRIPTION
|
== DESCRIPTION
|
||||||
|
|
||||||
Queries the change database and returns results describing changes
|
Queries the change search index and returns results describing changes
|
||||||
that match the input query. More recently updated changes appear
|
that match the input query. More recently updated changes appear
|
||||||
before older changes, which is the same order presented in the
|
before older changes, which is the same order presented in the
|
||||||
web interface. For each matching change, the result contains data
|
web interface. For each matching change, the result contains data
|
||||||
|
@ -27,7 +27,7 @@ _ssh_ -p <port> <host> _gerrit review_
|
|||||||
== DESCRIPTION
|
== DESCRIPTION
|
||||||
Updates the current user's approval status of the specified patch
|
Updates the current user's approval status of the specified patch
|
||||||
sets and/or submits them for merging, sending out email
|
sets and/or submits them for merging, sending out email
|
||||||
notifications and updating the database.
|
notifications and updating code review metadata.
|
||||||
|
|
||||||
Patch sets may be specified in 'CHANGEID,PATCHSET' format, such as
|
Patch sets may be specified in 'CHANGEID,PATCHSET' format, such as
|
||||||
'8242,2', or 'COMMIT' format.
|
'8242,2', or 'COMMIT' format.
|
||||||
|
@ -46,8 +46,8 @@ Changing this parameter requires to migrate database using the
|
|||||||
link:pgm-MigrateAccountPatchReviewDb.html[MigrateAccountPatchReviewDb] program.
|
link:pgm-MigrateAccountPatchReviewDb.html[MigrateAccountPatchReviewDb] program.
|
||||||
Migration cannot be done while the server is running.
|
Migration cannot be done while the server is running.
|
||||||
+
|
+
|
||||||
Also note that the db_name has to be a new db and not reusing gerrit's own review database,
|
Also note that the db_name has to be a new db and not reusing an old ReviewDb
|
||||||
otherwise gerrit's init will remove the table.
|
database from a former 2.x site, otherwise gerrit's init will remove the table.
|
||||||
|
|
||||||
----
|
----
|
||||||
[accountPatchReviewDb]
|
[accountPatchReviewDb]
|
||||||
@ -805,11 +805,10 @@ cache `"accounts"`::
|
|||||||
+
|
+
|
||||||
Cache entries contain important details of an active user, including
|
Cache entries contain important details of an active user, including
|
||||||
their display name, preferences, and known email addresses. Entry
|
their display name, preferences, and known email addresses. Entry
|
||||||
information is obtained from the `accounts` database table.
|
information is obtained from NoteDb data in the `All-Users` repo.
|
||||||
|
|
||||||
+
|
+
|
||||||
If direct updates are made to any of these database tables, this
|
If direct updates are made to `All-Users`, this cache should be flushed.
|
||||||
cache should be flushed.
|
|
||||||
|
|
||||||
cache `"adv_bases"`::
|
cache `"adv_bases"`::
|
||||||
+
|
+
|
||||||
@ -2623,8 +2622,7 @@ Defaults to no limit.
|
|||||||
+
|
+
|
||||||
Maximum number of leaf terms to allow in a query. Too-large queries may
|
Maximum number of leaf terms to allow in a query. Too-large queries may
|
||||||
perform poorly, so setting this option causes query parsing to fail fast
|
perform poorly, so setting this option causes query parsing to fail fast
|
||||||
before attempting to send them to the secondary index. Should this limit
|
before attempting to send them to the secondary index.
|
||||||
be reached, database is used instead of index as applicable.
|
|
||||||
+
|
+
|
||||||
When the index type is `LUCENE`, also sets the maximum number of clauses
|
When the index type is `LUCENE`, also sets the maximum number of clauses
|
||||||
permitted per BooleanQuery. This is so that all enforced query limits
|
permitted per BooleanQuery. This is so that all enforced query limits
|
||||||
@ -3318,9 +3316,9 @@ Common examples:
|
|||||||
[[note-db]]
|
[[note-db]]
|
||||||
=== Section noteDb
|
=== Section noteDb
|
||||||
|
|
||||||
NoteDb is the next generation of Gerrit storage backend, currently powering
|
NoteDb is the Git-based database storage backend for Gerrit. For more
|
||||||
`googlesource.com`. For more information, including how to migrate your data,
|
information, including how to migrate data from an older Gerrit version, see the
|
||||||
see the link:note-db.html[documentation].
|
link:note-db.html[documentation].
|
||||||
|
|
||||||
[[notedb.accounts.sequenceBatchSize]]notedb.accounts.sequenceBatchSize::
|
[[notedb.accounts.sequenceBatchSize]]notedb.accounts.sequenceBatchSize::
|
||||||
+
|
+
|
||||||
|
@ -36,7 +36,6 @@ Robot comments can be dropped by deleting this ref.
|
|||||||
|
|
||||||
== Limitations
|
== Limitations
|
||||||
|
|
||||||
* Robot comments are only supported with NoteDb, but not with ReviewDb.
|
|
||||||
* Robot comments are not displayed in the web UI yet.
|
* Robot comments are not displayed in the web UI yet.
|
||||||
* There is no support for draft robot comments, but robot comments are
|
* There is no support for draft robot comments, but robot comments are
|
||||||
always published and visible to everyone who can see the change.
|
always published and visible to everyone who can see the change.
|
||||||
|
@ -250,7 +250,6 @@ back and consult this section when creating them.
|
|||||||
Here are some design level objectives that you should keep in mind
|
Here are some design level objectives that you should keep in mind
|
||||||
when coding:
|
when coding:
|
||||||
|
|
||||||
* ORM entity objects should match exactly one row in the database.
|
|
||||||
* Most client pages should perform only one RPC to load so as to
|
* Most client pages should perform only one RPC to load so as to
|
||||||
keep latencies down. Exceptions would apply to RPCs which need
|
keep latencies down. Exceptions would apply to RPCs which need
|
||||||
to load large data sets if splitting them out will help the
|
to load large data sets if splitting them out will help the
|
||||||
@ -269,10 +268,11 @@ when coding:
|
|||||||
* Don't leave repository objects (git or schema) open. A .close()
|
* Don't leave repository objects (git or schema) open. A .close()
|
||||||
after every open should be placed in a finally{} block.
|
after every open should be placed in a finally{} block.
|
||||||
* Don't leave UI components, which can cause new actions to occur,
|
* Don't leave UI components, which can cause new actions to occur,
|
||||||
enabled during RPCs which update the DB. This is to prevent
|
enabled during RPCs which update Git repositories, including NoteDb.
|
||||||
people from submitting actions more than once when operating
|
This is to prevent people from submitting actions more than once
|
||||||
on slow links. If the action buttons are disabled, they cannot
|
when operating on slow links. If the action buttons are disabled,
|
||||||
be resubmitted and the user can see that Gerrit is still busy.
|
they cannot be resubmitted and the user can see that Gerrit is still
|
||||||
|
busy.
|
||||||
* ...and so is Guava (previously known as Google Collections).
|
* ...and so is Guava (previously known as Google Collections).
|
||||||
|
|
||||||
|
|
||||||
|
@ -325,10 +325,10 @@ from the Section.Factory rather than from an injected Config object.
|
|||||||
|
|
||||||
Plugins' InitSteps are executed during the "Gerrit Plugin init" phase, after
|
Plugins' InitSteps are executed during the "Gerrit Plugin init" phase, after
|
||||||
the extraction of the plugins embedded in the distribution .war file into
|
the extraction of the plugins embedded in the distribution .war file into
|
||||||
`$GERRIT_SITE/plugins` and before the DB Schema initialization or upgrade.
|
`$GERRIT_SITE/plugins` and before the site initialization or upgrade.
|
||||||
|
|
||||||
A plugin's InitStep cannot refer to Gerrit's DB Schema or any other Gerrit
|
A plugin's InitStep cannot refer to any Gerrit runtime objects injected at
|
||||||
runtime objects injected at startup.
|
startup.
|
||||||
|
|
||||||
[source,java]
|
[source,java]
|
||||||
----
|
----
|
||||||
@ -1573,9 +1573,8 @@ public Object apply(RevisionResource rcrs, Input in) {
|
|||||||
// schedule a build
|
// schedule a build
|
||||||
[...]
|
[...]
|
||||||
// update change
|
// update change
|
||||||
ReviewDb db = dbProvider.get();
|
|
||||||
try (BatchUpdate bu = batchUpdateFactory.create(
|
try (BatchUpdate bu = batchUpdateFactory.create(
|
||||||
db, project.getNameKey(), user, TimeUtil.nowTs())) {
|
project.getNameKey(), user, TimeUtil.nowTs())) {
|
||||||
bu.addOp(change.getId(), new BatchUpdate.Op() {
|
bu.addOp(change.getId(), new BatchUpdate.Op() {
|
||||||
@Override
|
@Override
|
||||||
public boolean updateChange(ChangeContext ctx) {
|
public boolean updateChange(ChangeContext ctx) {
|
||||||
|
@ -61,8 +61,7 @@ the notes under link:dev-readme.html[developer setup].
|
|||||||
|
|
||||||
Gerrit stores configuration files, the server's SSH keys, and the
|
Gerrit stores configuration files, the server's SSH keys, and the
|
||||||
managed Git repositories under a local directory, typically referred
|
managed Git repositories under a local directory, typically referred
|
||||||
to as `'$site_path'`. If the embedded H2 database is being used,
|
to as `'$site_path'`.
|
||||||
its data files will also be stored under this directory.
|
|
||||||
|
|
||||||
You also have to decide where to store your server side git repositories. This
|
You also have to decide where to store your server side git repositories. This
|
||||||
can either be a relative path under `'$site_path'` or an absolute path
|
can either be a relative path under `'$site_path'` or an absolute path
|
||||||
@ -87,11 +86,10 @@ have any privileges, you may have to manually create the directory first and
|
|||||||
then give ownership of that location to the `'gerrit'` user.
|
then give ownership of that location to the `'gerrit'` user.
|
||||||
|
|
||||||
If run from an interactive terminal, the init command will prompt through a
|
If run from an interactive terminal, the init command will prompt through a
|
||||||
series of configuration questions, including gathering information
|
series of configuration questions. If the terminal is not interactive,
|
||||||
about the database created above. If the terminal is not interactive,
|
running the init command will choose some reasonable default selections.
|
||||||
running the init command will choose some reasonable default selections,
|
Once the init phase is complete, you can review your settings in the file
|
||||||
and will use the embedded H2 database. Once the init phase is complete,
|
`'$site_path/etc/gerrit.config'`.
|
||||||
you can review your settings in the file `'$site_path/etc/gerrit.config'`.
|
|
||||||
|
|
||||||
When running the init command, additional JARs might be downloaded to
|
When running the init command, additional JARs might be downloaded to
|
||||||
support optional selected functionality. If a download fails a URL will
|
support optional selected functionality. If a download fails a URL will
|
||||||
|
@ -106,10 +106,6 @@ Each queue provides the following metrics:
|
|||||||
* `sshd/sessions/created`: Rate of new SSH sessions.
|
* `sshd/sessions/created`: Rate of new SSH sessions.
|
||||||
* `sshd/sessions/authentication_failures`: Rate of SSH authentication failures.
|
* `sshd/sessions/authentication_failures`: Rate of SSH authentication failures.
|
||||||
|
|
||||||
=== SQL connections
|
|
||||||
|
|
||||||
* `sql/connection_pool/connections`: SQL database connections.
|
|
||||||
|
|
||||||
=== Topics
|
=== Topics
|
||||||
|
|
||||||
* `topic/cross_project_submit`: number of cross-project topic submissions.
|
* `topic/cross_project_submit`: number of cross-project topic submissions.
|
||||||
|
@ -47,7 +47,7 @@ it must be run by itself.
|
|||||||
|
|
||||||
== CONTEXT
|
== CONTEXT
|
||||||
This command can only be run on a server which has direct
|
This command can only be run on a server which has direct
|
||||||
connectivity to the metadata database.
|
connectivity to the managed Git repositories.
|
||||||
|
|
||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
To convert the local username of every account to lower case:
|
To convert the local username of every account to lower case:
|
||||||
|
@ -28,7 +28,7 @@ for some basic setup prior to writing default configuration files
|
|||||||
into a newly created `$site_path`.
|
into a newly created `$site_path`.
|
||||||
|
|
||||||
If run in an existing `$site_path`, init upgrades existing resources
|
If run in an existing `$site_path`, init upgrades existing resources
|
||||||
(e.g. DB schema, plugins) as necessary.
|
(e.g. NoteDb schema, plugins) as necessary.
|
||||||
|
|
||||||
== OPTIONS
|
== OPTIONS
|
||||||
-b::
|
-b::
|
||||||
@ -100,8 +100,7 @@ objects these SQL statements must be executed manually.
|
|||||||
folder.
|
folder.
|
||||||
|
|
||||||
== CONTEXT
|
== CONTEXT
|
||||||
This command can only be run on a server which has direct
|
This command can only be run on a server which has direct local access to the
|
||||||
connectivity to the metadata database, and local access to the
|
|
||||||
managed Git repositories.
|
managed Git repositories.
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
|
@ -33,8 +33,7 @@ named `rules-'SHA1'.jar` in `'$site_path'/cache/rules`.
|
|||||||
Compile rules for the specified project.
|
Compile rules for the specified project.
|
||||||
|
|
||||||
== CONTEXT
|
== CONTEXT
|
||||||
This command can only be run on a server which has direct
|
This command can only be run on a server which has local access to the
|
||||||
connectivity to the metadata database, and local access to the
|
|
||||||
managed Git repositories.
|
managed Git repositories.
|
||||||
|
|
||||||
Caching needs to be enabled. See
|
Caching needs to be enabled. See
|
||||||
|
@ -732,7 +732,7 @@ client invoked by the end-user, or by `repo upload`. This allows
|
|||||||
Gerrit to provide magical refs, such as `+refs/for/*+` for new
|
Gerrit to provide magical refs, such as `+refs/for/*+` for new
|
||||||
change submission and `+refs/changes/*+` for change replacement.
|
change submission and `+refs/changes/*+` for change replacement.
|
||||||
When a push request is received to create a ref in one of these
|
When a push request is received to create a ref in one of these
|
||||||
namespaces Gerrit performs its own logic to update the database,
|
namespaces Gerrit performs its own logic to update the review metadata,
|
||||||
and then lies to the client about the result of the operation.
|
and then lies to the client about the result of the operation.
|
||||||
A successful result causes the client to believe that Gerrit has
|
A successful result causes the client to believe that Gerrit has
|
||||||
created the ref, but in reality Gerrit hasn't created the ref at all.
|
created the ref, but in reality Gerrit hasn't created the ref at all.
|
||||||
|
Loading…
Reference in New Issue
Block a user