gerrit/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/git
Dave Borowitz fc9d1ae55f Add config option setting default primary storage for new changes
Setting to NOTE_DB means new changes will never be written to
ReviewDb. Update ChangeNotes.Factory to properly detect the case of a
change not existing in ReviewDb but possibly still existing in NoteDb.

This config option only controls the primary storage for new changes.
Old changes (that have not been migrated, which is all of them since
this change predates the migration tools) keep their primary storage
as REVIEW_DB. This means that a single running server needs to be able
to handle a mix of NOTE_DB/REVIEW_DB changes. Thus we need to continue
using a live ReviewDb instance in the server, and just avoid writing
any NoteDb-primary changes to that instance.

The easiest way to implement this technically is to keep all the
BatchUpdate code the same but only commit the change transaction if
the change requires ReviewDb. This means we don't have to change any
BatchUpdate.Op implementations, they can continue unconditionally
writing. Rolling back the transaction is much simpler than creating
some kind of ReviewDb wrapper that drops writes on the floor, even
though it does technically create some database traffic even though no
writes are committed.

Add a new NoteDbMode to run all tests with this option enabled,
double-checking after the tests that no changes were stored in
ReviewDb. Tweak tests in various ways to work with this option
enabled, avoiding direct use of ReviewDb when the primary storage is
NoteDb.

Change-Id: I9caf13192f955c4ec90409da32609d0a6f496d96
2017-01-13 14:47:32 -05:00
..
AbstractPushForReview.java Require account index and remove fallbacks 2016-12-29 11:23:56 +01:00
AbstractSubmoduleSubscription.java Merge changes Ia8e794f6,I950e9108 2016-10-28 17:09:34 +00:00
BUCK Introduce SubmitPreview REST API call 2016-09-16 12:20:02 -07:00
BUILD Bazel: Reformat build files 2016-12-07 11:33:07 +00:00
DraftChangeBlockedIT.java Remove test prefix from test methods 2016-12-06 10:36:42 +01:00
ForcePushIT.java Fix deprecation warnings from latest JGit update 2016-01-06 10:50:28 -05:00
HttpPushForReviewIT.java Make integration test methods throw Exception 2014-10-28 12:23:26 -07:00
ImplicitMergeCheckIT.java Option to reject implicit merges when pushing changes for review 2016-09-01 11:50:11 +02:00
RefAdvertisementIT.java Add config option setting default primary storage for new changes 2017-01-13 14:47:32 -05:00
SshPushForReviewIT.java Organize imports 2016-12-27 14:02:13 +00:00
SubmitOnPushIT.java Support setting current patch set in NoteDb 2016-12-19 09:21:35 -05:00
SubmoduleSectionParserIT.java Remove test prefix from test methods 2016-12-06 10:36:42 +01:00
SubmoduleSubscriptionsIT.java Remove test prefix from test methods 2016-12-06 10:36:42 +01:00
SubmoduleSubscriptionsWholeTopicMergeIT.java Remove test prefix from test methods 2016-12-06 10:36:42 +01:00