gerrit/gerrit-server/src/main/java/com/google/gerrit/server
David Ostrovsky 7d5a771844 Replace ACCOUNT_DIFF_PREFERENCES table with Git backend (part1)
Replace the usage of AccountDiffPreference with a different class in
extension API package.

Data is saved optimized in Git backend: default values are discarded
during save operation and restored during read operation; so that
this optimization step is transparent for the callers.

For example when only one setting, theme in this case, differs from
the default value, only this value is written into diff section in
preferences.config file:

+[diff]
+       theme = eclipse

To support live migration, the upgrade is done in two steps:

* part1 (this change):
  o Always write to both git and db
  o Introduce new configuration option to indicate whether to read from
    git or db, initially set to read from db
  o First binary update: some servers are reading/writing just the db;
    some servers are additionally writing to git
  o After first update: all servers are reading from the db, writing to
    both
  o Batch copy data from db to git (only related to non open source
    Gerrit version)
  o Update all servers to read from git. During the update, some will
    still be reading from the db; that's ok, because everybody is
    writing to git
* part2 (next change):
  o Bump database version, migrate the data from db to git, delete the
    table (and the flag) from the code and update the servers.

Change-Id: I30a6d82f4a8d0c33ae9bb26d7f93c66bd0cb8bee
2015-10-30 11:38:30 +01:00
..
access Use static inner classes where appropriate 2015-07-07 22:27:47 +00:00
account Replace ACCOUNT_DIFF_PREFERENCES table with Git backend (part1) 2015-10-30 11:38:30 +01:00
api Remove unneeded exception declarations from REST handlers 2015-10-22 07:12:30 +02:00
args4j Make Branch.NameKey enforce full ref names 2015-04-27 16:30:12 +09:00
auth Convert CurrentUser to IdentifiedUser without casting 2015-10-19 11:49:10 -04:00
avatar
cache Move FactoryModule to gerrit-extension-api 2015-08-26 12:39:08 -04:00
change Replace ACCOUNT_DIFF_PREFERENCES table with Git backend (part1) 2015-10-30 11:38:30 +01:00
config Fix set preferences REST handler for partially filled input record 2015-10-30 11:36:14 +01:00
data Terminate sortkey with prejudice 2014-12-23 14:48:06 -08:00
documentation Consistently use character encoding constants 2015-10-16 08:39:12 +00:00
edit Merge branch 'stable-2.11' 2015-10-27 11:10:42 +09:00
events EventFactory: Use repo instead of PatchSetAncestors for parents 2015-10-28 08:58:13 -04:00
extensions Merge branch 'stable-2.11' 2015-10-16 17:14:25 +09:00
git Replace ACCOUNT_DIFF_PREFERENCES table with Git backend (part1) 2015-10-30 11:38:30 +01:00
group Remove unneeded exception declarations from REST handlers 2015-10-22 07:12:30 +02:00
index Remove ChangeQueryRewriter interface 2015-10-28 12:11:25 -04:00
ioutil Consistently use character encoding constants 2015-10-16 08:39:12 +00:00
mail Convert PublishDraftPatchSet to BatchOp 2015-10-19 12:41:51 -04:00
mime Separately bind MimeUtil2 as singleton 2015-01-09 22:51:29 +00:00
notedb Allow to enable note DB for all integration tests 2015-10-26 09:29:06 +00:00
patch Replace ACCOUNT_DIFF_PREFERENCES table with Git backend (part1) 2015-10-30 11:38:30 +01:00
plugins Merge branch 'stable-2.11' 2015-10-27 11:10:42 +09:00
project Adjust line wrapping to silence Checkstyle warnings 2015-10-29 11:55:32 +09:00
query Remove ChangeQueryRewriter interface 2015-10-28 12:11:25 -04:00
schema Replace ACCOUNT_DIFF_PREFERENCES table with Git backend (part1) 2015-10-30 11:38:30 +01:00
securestore Use site.secure_config instead of site.etc_dir.resolve("secure.config") 2015-10-06 17:16:52 +02:00
ssh
tools Consistently use character encoding constants 2015-10-16 08:39:12 +00:00
util Convert CurrentUser to IdentifiedUser without casting 2015-10-19 11:49:10 -04:00
validators Remove unused import in OutgoingEmailValidationListener 2015-01-09 10:16:38 +09:00
AccessPath.java
AnonymousUser.java Revert "Perform user.getEffectiveGroups() less eagerly" 2015-02-17 17:16:33 -08:00
ApprovalCopier.java Fix CheckIT#currentPatchSetMissing() test when notedb is enabled 2015-10-27 17:32:02 +01:00
ApprovalsUtil.java Use uploader for approvals specified on push, not the committer 2015-10-15 03:08:47 +02:00
ChangeMessagesUtil.java ChangeJson: Restore async reviewed bit loading 2015-05-27 14:27:54 -07:00
ChangeUtil.java Remove PatchSetAncestors table 2015-10-28 08:58:13 -04:00
CmdLineParserModule.java Move FactoryModule to gerrit-extension-api 2015-08-26 12:39:08 -04:00
CommonConverters.java Fix JavaDoc warning 2014-08-19 22:36:27 +00:00
CurrentUser.java Convert CurrentUser to IdentifiedUser without casting 2015-10-19 11:49:10 -04:00
EnableSignedPush.java Move most GPG-related code to a gerrit-gpg module 2015-08-28 14:13:13 -04:00
GerritPersonIdent.java
GerritPersonIdentProvider.java Revert "Use javax.inject.Inject instead of com.google.inject.Inject" 2014-09-30 10:53:50 +02:00
GpgException.java Move most GPG-related code to a gerrit-gpg module 2015-08-28 14:13:13 -04:00
IdentifiedUser.java Replace ACCOUNT_DIFF_PREFERENCES table with Git backend (part1) 2015-10-30 11:38:30 +01:00
InternalUser.java Allow InternalUsers to see drafts 2015-10-09 12:49:47 +00:00
OptionUtil.java
OutputFormat.java
PatchLineCommentsUtil.java PatchLineCommentsUtil: Add "final" to the public static PLC_ORDER. 2015-09-29 11:30:49 +09:00
PeerDaemonUser.java Revert "Perform user.getEffectiveGroups() less eagerly" 2015-02-17 17:16:33 -08:00
PluginUser.java Revert "Use javax.inject.Inject instead of com.google.inject.Inject" 2014-09-30 10:53:50 +02:00
ProjectUtil.java Use try-with-resources statements 2015-06-23 21:11:57 +02:00
RemotePeer.java
RequestCleanup.java Turn on many more Eclipse warnings, and fix them 2014-10-29 15:00:17 -07:00
StringUtil.java
UrlEncoded.java
WebLinks.java Add WebLink extension point for file history 2015-08-25 08:47:55 +02:00