Add debugs logs on access to external IDs and group names note branches
We want to see in a trace when a request triggers many accesses to the external IDs or group names note branches. Change-Id: Ia05ad6458b0203a340bde76ae4c256cb8e800d1b Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
		| @@ -615,6 +615,8 @@ public class ExternalIdNotes extends VersionedMetaData { | ||||
|  | ||||
|   @Override | ||||
|   protected void onLoad() throws IOException, ConfigInvalidException { | ||||
|     logger.atFine().log("Reading external IDs"); | ||||
|  | ||||
|     noteMap = revision != null ? NoteMap.read(reader, revision) : NoteMap.newEmptyMap(); | ||||
|  | ||||
|     if (afterReadRevision != null) { | ||||
| @@ -701,6 +703,8 @@ public class ExternalIdNotes extends VersionedMetaData { | ||||
|       return false; | ||||
|     } | ||||
|  | ||||
|     logger.atFine().log("Updating external IDs"); | ||||
|  | ||||
|     if (Strings.isNullOrEmpty(commit.getMessage())) { | ||||
|       commit.setMessage("Update external IDs\n"); | ||||
|     } | ||||
|   | ||||
| @@ -25,6 +25,7 @@ import com.google.common.collect.HashMultiset; | ||||
| import com.google.common.collect.ImmutableBiMap; | ||||
| import com.google.common.collect.ImmutableList; | ||||
| import com.google.common.collect.Multiset; | ||||
| import com.google.common.flogger.FluentLogger; | ||||
| import com.google.common.hash.Hashing; | ||||
| import com.google.gerrit.common.Nullable; | ||||
| import com.google.gerrit.common.data.GroupReference; | ||||
| @@ -87,6 +88,8 @@ import org.eclipse.jgit.transport.ReceiveCommand; | ||||
|  * </ul> | ||||
|  */ | ||||
| public class GroupNameNotes extends VersionedMetaData { | ||||
|   private static final FluentLogger logger = FluentLogger.forEnclosingClass(); | ||||
|  | ||||
|   private static final String SECTION_NAME = "group"; | ||||
|   private static final String UUID_PARAM = "uuid"; | ||||
|   private static final String NAME_PARAM = "name"; | ||||
| @@ -323,6 +326,8 @@ public class GroupNameNotes extends VersionedMetaData { | ||||
|   protected void onLoad() throws IOException, ConfigInvalidException { | ||||
|     nameConflicting = false; | ||||
|  | ||||
|     logger.atFine().log("Reading group notes"); | ||||
|  | ||||
|     if (revision != null) { | ||||
|       NoteMap noteMap = NoteMap.read(reader, revision); | ||||
|       if (newGroupName.isPresent()) { | ||||
| @@ -365,6 +370,8 @@ public class GroupNameNotes extends VersionedMetaData { | ||||
|       return false; | ||||
|     } | ||||
|  | ||||
|     logger.atFine().log("Updating group notes"); | ||||
|  | ||||
|     NoteMap noteMap = revision == null ? NoteMap.newEmptyMap() : NoteMap.read(reader, revision); | ||||
|     if (oldGroupName.isPresent()) { | ||||
|       removeNote(noteMap, oldGroupName.get(), inserter); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Edwin Kempin
					Edwin Kempin