Skip to content

Commit b1d6f55

Browse files
authored
Remove exclusions from breaking changes check (post 3.1.0 release) (opensearch-project#18632)
Signed-off-by: Andriy Redko <[email protected]>
1 parent 6154ffe commit b1d6f55

File tree

4 files changed

+85
-15
lines changed

4 files changed

+85
-15
lines changed

server/build.gradle

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -404,21 +404,6 @@ tasks.register("japicmp", me.champeau.gradle.japicmp.JapicmpTask) {
404404
failOnSourceIncompatibility = true
405405
annotationIncludes = ['@org.opensearch.common.annotation.PublicApi', '@org.opensearch.common.annotation.DeprecatedApi']
406406
annotationExcludes = ['@org.opensearch.common.annotation.InternalApi']
407-
// Already broken APIs, excluding them for now
408-
classExcludes = [
409-
"org.opensearch.action.DocWriteRequest",
410-
"org.opensearch.cluster.ClusterInfo",
411-
"org.opensearch.cluster.service.PendingClusterTask",
412-
"org.opensearch.index.IndexService",
413-
"org.opensearch.indices.IndicesService",
414-
"org.opensearch.index.IndexModule",
415-
"org.opensearch.index.store.remote.filecache.FileCacheStats",
416-
"org.opensearch.index.store.remote.filecache.FileCache",
417-
"org.opensearch.index.store.remote.utils.cache.CacheUsage",
418-
"org.opensearch.index.store.remote.utils.cache.stats.CacheStats",
419-
"org.opensearch.index.query.QueryCoordinatorContext",
420-
"org.opensearch.index.shard.IndexShard"
421-
]
422407
txtOutputFile = layout.buildDirectory.file("reports/java-compatibility/report.txt")
423408
htmlOutputFile = layout.buildDirectory.file("reports/java-compatibility/report.html")
424409
dependsOn downloadJapicmpCompareTarget

server/src/main/java/org/opensearch/cluster/ClusterInfo.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,29 @@ protected ClusterInfo() {
7878
this(Map.of(), Map.of(), Map.of(), Map.of(), Map.of(), Map.of(), Map.of());
7979
}
8080

81+
/**
82+
* Creates a new ClusterInfo instance.
83+
*
84+
* @param leastAvailableSpaceUsage a node id to disk usage mapping for the path that has the least available space on the node.
85+
* @param mostAvailableSpaceUsage a node id to disk usage mapping for the path that has the most available space on the node.
86+
* @param shardSizes a shardkey to size in bytes mapping per shard.
87+
* @param routingToDataPath the shard routing to datapath mapping
88+
* @param reservedSpace reserved space per shard broken down by node and data path
89+
* @param nodeFileCacheStats node file cache stats
90+
* @see #shardIdentifierFromRouting
91+
*/
92+
@Deprecated(forRemoval = true)
93+
public ClusterInfo(
94+
final Map<String, DiskUsage> leastAvailableSpaceUsage,
95+
final Map<String, DiskUsage> mostAvailableSpaceUsage,
96+
final Map<String, Long> shardSizes,
97+
final Map<ShardRouting, String> routingToDataPath,
98+
final Map<NodeAndPath, ReservedSpace> reservedSpace,
99+
final Map<String, AggregateFileCacheStats> nodeFileCacheStats
100+
) {
101+
this(leastAvailableSpaceUsage, mostAvailableSpaceUsage, shardSizes, routingToDataPath, reservedSpace, nodeFileCacheStats, Map.of());
102+
}
103+
81104
/**
82105
* Creates a new ClusterInfo instance.
83106
*

server/src/main/java/org/opensearch/index/IndexService.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,34 @@ private long getAvgShardSizeInBytes() throws IOException {
590590
}
591591
}
592592

593+
@Deprecated(forRemoval = true)
594+
public synchronized IndexShard createShard(
595+
final ShardRouting routing,
596+
final Consumer<ShardId> globalCheckpointSyncer,
597+
final RetentionLeaseSyncer retentionLeaseSyncer,
598+
final SegmentReplicationCheckpointPublisher checkpointPublisher,
599+
final RemoteStoreStatsTrackerFactory remoteStoreStatsTrackerFactory,
600+
final RepositoriesService repositoriesService,
601+
final DiscoveryNode targetNode,
602+
@Nullable DiscoveryNode sourceNode,
603+
DiscoveryNodes discoveryNodes,
604+
MergedSegmentWarmerFactory mergedSegmentWarmerFactory
605+
) throws IOException {
606+
return createShard(
607+
routing,
608+
globalCheckpointSyncer,
609+
retentionLeaseSyncer,
610+
checkpointPublisher,
611+
remoteStoreStatsTrackerFactory,
612+
repositoriesService,
613+
targetNode,
614+
sourceNode,
615+
discoveryNodes,
616+
mergedSegmentWarmerFactory,
617+
null
618+
);
619+
}
620+
593621
public synchronized IndexShard createShard(
594622
final ShardRouting routing,
595623
final Consumer<ShardId> globalCheckpointSyncer,

server/src/main/java/org/opensearch/indices/IndicesService.java

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,40 @@ public synchronized void verifyIndexMetadata(IndexMetadata metadata, IndexMetada
12191219
}
12201220
}
12211221

1222+
@Deprecated(forRemoval = true)
1223+
public IndexShard createShard(
1224+
final ShardRouting shardRouting,
1225+
final SegmentReplicationCheckpointPublisher checkpointPublisher,
1226+
final PeerRecoveryTargetService recoveryTargetService,
1227+
final RecoveryListener recoveryListener,
1228+
final RepositoriesService repositoriesService,
1229+
final Consumer<IndexShard.ShardFailure> onShardFailure,
1230+
final Consumer<ShardId> globalCheckpointSyncer,
1231+
final RetentionLeaseSyncer retentionLeaseSyncer,
1232+
final DiscoveryNode targetNode,
1233+
final DiscoveryNode sourceNode,
1234+
final RemoteStoreStatsTrackerFactory remoteStoreStatsTrackerFactory,
1235+
final DiscoveryNodes discoveryNodes,
1236+
final MergedSegmentWarmerFactory mergedSegmentWarmerFactory
1237+
) throws IOException {
1238+
return createShard(
1239+
shardRouting,
1240+
checkpointPublisher,
1241+
recoveryTargetService,
1242+
recoveryListener,
1243+
repositoriesService,
1244+
onShardFailure,
1245+
globalCheckpointSyncer,
1246+
retentionLeaseSyncer,
1247+
targetNode,
1248+
sourceNode,
1249+
remoteStoreStatsTrackerFactory,
1250+
discoveryNodes,
1251+
mergedSegmentWarmerFactory,
1252+
null
1253+
);
1254+
}
1255+
12221256
@Override
12231257
public IndexShard createShard(
12241258
final ShardRouting shardRouting,

0 commit comments

Comments
 (0)