murblanc commented on a change in pull request #1528: URL: https://github.com/apache/lucene-solr/pull/1528#discussion_r429815739
########## File path: solr/core/src/test/org/apache/solr/cloud/OverseerTest.java ########## @@ -181,16 +180,21 @@ public void close() { zkStateReader.close(); } + /** + * Create a collection. + * Note there's a similar but slightly different {@link OverseerTest#createCollection(String, int)}. Review comment: I hesitated. There are a few variations in how collections are created. I don't know if these variations are in purpose or end up doing the same thing and are there for historical reasons, and I tried to keep tests as identical to the way they were before as possible. IIRC the method was created where previously the code was just duplicated around, so there's some progress :), but I didn't want to change the logic of any test beyond what was strictly necessary. ########## File path: solr/core/src/java/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java ########## @@ -790,6 +790,33 @@ public void simRemoveReplica(String nodeId, String collection, String coreNodeNa } /** +<<<<<<< HEAD +======= + * Save clusterstate.json to {@link DistribStateManager}. + * @return saved state + */ + private ClusterState saveClusterState(ClusterState state) throws IOException { + ensureNotClosed(); + + // TODO: this method is emptied of its content in order to compile. We're not saving the cluster state that has to be saved collection per collection in separate state.json files. + // TODO: DO NOT CHECK THIS IN. Check with AB how to update sim to stateFormat 2 + +// byte[] data = Utils.toJSON(state); +// try { +// VersionedData oldData = stateManager.getData(ZkStateReader.CLUSTER_STATE); +// int version = oldData != null ? oldData.getVersion() : 0; +// assert clusterStateVersion == version : "local clusterStateVersion out of sync"; +// stateManager.setData(ZkStateReader.CLUSTER_STATE, data, version); +// log.debug("** saved cluster state version {}", version); +// clusterStateVersion++; +// } catch (Exception e) { +// throw new IOException(e); +// } + return state; + } + + /** +>>>>>>> SOLR-12823: remove /clusterstate.json Review comment: Ouch. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org