mirror of https://github.com/apache/lucene.git
SOLR-10756: Undeprecate ZkStateReader.updateClusterState(), mark as @lucene.internal, and rename to forciblyRefreshAllClusterStateSlow().
This commit is contained in:
parent
936bb4abe9
commit
68623e975c
solr
CHANGES.txt
core/src
java/org/apache/solr/cloud
test/org/apache/solr/cloud
solrj/src/java/org/apache/solr/common/cloud
|
@ -575,6 +575,9 @@ Other Changes
|
|||
|
||||
* SOLR-11155: /analysis/field and /analysis/document requests should support points fields.
|
||||
(Jason Gerlowski, Steve Rowe)
|
||||
|
||||
* SOLR-10756: Undeprecate ZkStateReader.updateClusterState(), mark as @lucene.internal, and rename to
|
||||
forciblyRefreshAllClusterStateSlow().
|
||||
|
||||
================== 6.7.0 ==================
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ public class Overseer implements Closeable {
|
|||
//TODO consider removing 'refreshClusterState' and simply check if clusterState is null
|
||||
if (refreshClusterState) {
|
||||
try {
|
||||
reader.updateClusterState();
|
||||
reader.forciblyRefreshAllClusterStateSlow();
|
||||
clusterState = reader.getClusterState();
|
||||
zkStateWriter = new ZkStateWriter(reader, stats);
|
||||
refreshClusterState = false;
|
||||
|
|
|
@ -132,7 +132,7 @@ public class TestTolerantUpdateProcessorCloud extends SolrCloudTestCase {
|
|||
String nodeKey = jettyURL.getHost() + ":" + jettyURL.getPort() + jettyURL.getPath().replace("/","_");
|
||||
urlMap.put(nodeKey, jettyURL.toString());
|
||||
}
|
||||
zkStateReader.updateClusterState();
|
||||
zkStateReader.forceUpdateCollection(COLLECTION_NAME);
|
||||
ClusterState clusterState = zkStateReader.getClusterState();
|
||||
for (Slice slice : clusterState.getSlices(COLLECTION_NAME)) {
|
||||
String shardName = slice.getName();
|
||||
|
|
|
@ -261,10 +261,11 @@ public class ZkStateReader implements Closeable {
|
|||
/**
|
||||
* Forcibly refresh cluster state from ZK. Do this only to avoid race conditions because it's expensive.
|
||||
*
|
||||
* @deprecated Don't call this, call {@link #forceUpdateCollection(String)} on a single collection if you must.
|
||||
* It is cheaper to call {@link #forceUpdateCollection(String)} on a single collection if you must.
|
||||
*
|
||||
* @lucene.internal
|
||||
*/
|
||||
@Deprecated
|
||||
public void updateClusterState() throws KeeperException, InterruptedException {
|
||||
public void forciblyRefreshAllClusterStateSlow() throws KeeperException, InterruptedException {
|
||||
synchronized (getUpdateLock()) {
|
||||
if (clusterState == null) {
|
||||
// Never initialized, just run normal initialization.
|
||||
|
|
Loading…
Reference in New Issue