fullstorydev / solr-bench

Solr benchmarking and load testing harness
Apache License 2.0
17 stars 10 forks source link

Fixed compilation error after upgrading solr-solrj from 8.11.0 to 9.1.0 #60

Closed patsonluk closed 1 year ago

patsonluk commented 1 year ago

Description

There are several compilation errors after the upgrade enforced by Synk: https://github.com/fullstorydev/solr-bench/pull/57

Cause/Solution

  1. Common IO Utils are now runtime dependency. Fix : simply replace those calls with java standard lib functions
  2. ZkStateReader/ZkClient no longer directly available from the CloudSolrClient. Fix: for simplicity we included the org.apache.solr:solr-solrj-zookeeper:9.1.0 and org.apache.zookeeper:zookeeper:3.8.0 ~as provided dependency~ (has to be compiled, as the runtime environment does not have it by default) and obtain the ZkStateReader/ZkClient from CloudSolrClient.getClusterStateProvider with class casting. We could have instantiated the SolrZkClient directly, but that would require exactly the same extra dependencies anyway, so let's just keep using the one from CloudSolrClient
  3. Other misc changes such as CloudSolrClient$Builder signature change, deprecation of maxShard etc
  4. Use maven assembly plugin version 3.5.0 https://github.com/fullstorydev/solr-bench/pull/60/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8R226, otherwise the final jar might pick wrong framework version when there's conflict
patsonluk commented 1 year ago

Going to merge this one in as the current master cannot compile 😅