Skip to content

Commit

Permalink
Remove troubleshooting code
Browse files Browse the repository at this point in the history
  • Loading branch information
williamrandolph committed Dec 6, 2023
1 parent 958b0ce commit e269e83
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 22 deletions.
6 changes: 0 additions & 6 deletions qa/rolling-upgrade-legacy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
setting 'repositories.url.allowed_urls', 'http://snapshot.test*'
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
setting 'xpack.security.enabled', 'false'
// start: "https://github.com/elastic/elasticsearch/issues/99778"
setting 'logger.org.elasticsearch.cluster.action.shard.ShardStateAction', 'TRACE'
setting 'logger.org.elasticsearch.index.IndexService', 'TRACE'
setting 'logger.org.elasticsearch.index.mapper.MapperService', 'TRACE'
setting 'logger.org.elasticsearch.indices.SystemIndexMappingUpdateService', 'TRACE'
// end: logging for "https://github.com/elastic/elasticsearch/issues/99778"
requiresFeature 'es.index_mode_feature_flag_registered', Version.fromString("8.0.0")
}

Expand Down
7 changes: 0 additions & 7 deletions qa/rolling-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,7 @@ testArtifacts {
}

BuildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->

// def baseCluster = testClusters.register(baseName) {
// setting 'logger.org.elasticsearch.indices.SystemIndexMappingUpdateService', 'TRACE'
// setting 'logger.org.elasticsearch.index.mapper.MapperService', 'TRACE'
// }

tasks.register(bwcTaskName(bwcVersion), StandaloneRestIntegTestTask) {
// useCluster(baseCluster)
usesBwcDistribution(bwcVersion)
systemProperty("tests.old_cluster_version", bwcVersion)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ public ShardFailedClusterStateTaskExecutor(AllocationService allocationService,

@Override
public ClusterState execute(BatchExecutionContext<FailedShardUpdateTask> batchExecutionContext) throws Exception {
logger.trace("Handling failed shard update tasks");
List<ClusterStateTaskExecutor.TaskContext<FailedShardUpdateTask>> tasksToBeApplied = new ArrayList<>();
List<FailedShard> failedShardsToBeApplied = new ArrayList<>();
List<StaleShard> staleShardsToBeApplied = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,7 @@ public void clusterChanged(ClusterChangedEvent event) {
// Use a RefCountingRunnable so that we only release the lock once all upgrade attempts have succeeded or failed.
// The failures are logged in upgradeIndexMetadata(), so we don't actually care about them here.
try (var refs = new RefCountingRunnable(() -> isUpgradeInProgress.set(false))) {
List<SystemIndexDescriptor> eligibleDescriptors = getEligibleDescriptors(state.getMetadata());
if (eligibleDescriptors.isEmpty()) {
logger.trace("No system indices to update");
}
for (SystemIndexDescriptor systemIndexDescriptor : eligibleDescriptors) {
logger.trace(() -> "Checking whether to update mappings for [" + systemIndexDescriptor.getPrimaryIndex() + "]");
for (SystemIndexDescriptor systemIndexDescriptor : getEligibleDescriptors(state.getMetadata())) {
UpgradeStatus upgradeStatus;
try {
upgradeStatus = getUpgradeStatus(state, systemIndexDescriptor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,15 +538,13 @@ private void updateIndices(ClusterChangedEvent event) {
try {
reason = "metadata update failed";
try {
logger.trace(() -> "Updating metadata for index [" + newIndexMetadata.getIndex() + "]");
indexService.updateMetadata(currentIndexMetadata, newIndexMetadata);
} catch (Exception e) {
assert false : e;
throw e;
}

reason = "mapping update failed";
logger.trace(() -> "Updating mappings for index [" + newIndexMetadata.getIndex() + "]");
indexService.updateMapping(currentIndexMetadata, newIndexMetadata);
} catch (Exception e) {
indicesService.removeIndex(index, FAILURE, "removing index (" + reason + ")");
Expand Down

0 comments on commit e269e83

Please sign in to comment.