You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2018/03/07 12:33:23 UTC

[01/11] lucene-solr:jira/solr-11670-2: Add release 6.6.3 to DOAP files

Repository: lucene-solr
Updated Branches:
  refs/heads/jira/solr-11670-2 163df9e0c -> 4851f43ad


Add release 6.6.3 to DOAP files


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/378d799a
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/378d799a
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/378d799a

Branch: refs/heads/jira/solr-11670-2
Commit: 378d799a22b9468e94d5f5ff3acc51bd7e8cc86e
Parents: 9cec222
Author: Steve Rowe <sa...@apache.org>
Authored: Tue Mar 6 12:54:22 2018 -0500
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Mar 6 12:54:22 2018 -0500

----------------------------------------------------------------------
 dev-tools/doap/lucene.rdf | 7 +++++++
 dev-tools/doap/solr.rdf   | 7 +++++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/378d799a/dev-tools/doap/lucene.rdf
----------------------------------------------------------------------
diff --git a/dev-tools/doap/lucene.rdf b/dev-tools/doap/lucene.rdf
index 12caed3..c33666d 100644
--- a/dev-tools/doap/lucene.rdf
+++ b/dev-tools/doap/lucene.rdf
@@ -104,6 +104,13 @@
     </release>
     <release>
       <Version>
+        <name>lucene-6.6.3</name>
+        <created>2018-03-07</created>
+        <revision>6.6.3</revision>
+      </Version>
+    </release>
+    <release>
+      <Version>
         <name>lucene-6.6.2</name>
         <created>2017-10-18</created>
         <revision>6.6.2</revision>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/378d799a/dev-tools/doap/solr.rdf
----------------------------------------------------------------------
diff --git a/dev-tools/doap/solr.rdf b/dev-tools/doap/solr.rdf
index 105e711..09bdb6b 100644
--- a/dev-tools/doap/solr.rdf
+++ b/dev-tools/doap/solr.rdf
@@ -104,6 +104,13 @@
     </release>
     <release>
       <Version>
+        <name>solr-6.6.3</name>
+        <created>2018-03-07</created>
+        <revision>6.6.3</revision>
+      </Version>
+    </release>
+    <release>
+      <Version>
         <name>solr-6.6.2</name>
         <created>2017-10-18</created>
         <revision>6.6.2</revision>


[03/11] lucene-solr:jira/solr-11670-2: SOLR-11795: Add more explanation in places; rework headings a bit; fix CSS for better display of labeled list

Posted by ab...@apache.org.
SOLR-11795: Add more explanation in places; rework headings a bit; fix CSS for better display of labeled list


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/be11f56b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/be11f56b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/be11f56b

Branch: refs/heads/jira/solr-11670-2
Commit: be11f56bbcf3085829f09eb9d30eede4bba62705
Parents: 2ff27ca
Author: Cassandra Targett <ct...@apache.org>
Authored: Tue Mar 6 12:53:25 2018 -0600
Committer: Cassandra Targett <ct...@apache.org>
Committed: Tue Mar 6 12:54:37 2018 -0600

----------------------------------------------------------------------
 solr/solr-ref-guide/src/css/ref-guide.css       |   3 +-
 ...toring-solr-with-prometheus-and-grafana.adoc | 184 +++++++++++--------
 2 files changed, 113 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/be11f56b/solr/solr-ref-guide/src/css/ref-guide.css
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/css/ref-guide.css b/solr/solr-ref-guide/src/css/ref-guide.css
index 2988d75..1092830 100644
--- a/solr/solr-ref-guide/src/css/ref-guide.css
+++ b/solr/solr-ref-guide/src/css/ref-guide.css
@@ -2165,7 +2165,8 @@ ol.lowergreek
     background: none;
 }
 
-td.hdlist1
+td.hdlist1,
+td.hdlist1 > code
 {
     padding-right: .75em;
     font-weight: bold;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/be11f56b/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc b/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc
index 5348cfb..8796c74 100644
--- a/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc
+++ b/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc
@@ -16,77 +16,99 @@
 // specific language governing permissions and limitations
 // under the License.
 
-You can monitor Solr using solr-exporter that exposes Solr's metrics to https://prometheus.io[Prometheus], and visualize metrics using https://grafana.com[Grafana].
+If you use https://prometheus.io[Prometheus] and https://grafana.com[Grafana] for metrics storage and data visualization, Solr includes a Prometheus exporter to collect metrics and other data.
 
-It allows users to monitor not only Solr metrics which come from <<metrics-reporting.adoc#metrics-api,Metrics API>> but also facet counts which come from <<searching.adoc#searching,Searching>>.
+A Prometheus exporter (`solr-exporter`) allows users to monitor not only Solr metrics which come from <<metrics-reporting.adoc#metrics-api,Metrics API>>, but also facet counts which come from <<searching.adoc#searching,Searching>> and responses to <<collections-api.adoc#collections-api,Collections API>> commands and <<ping.adoc#ping,PingRequestHandler>> requests.
+
+This graphic provides a more detailed view:
 
 .solr-exporter Diagram
 image::images/monitoring-solr-with-prometheus-and-grafana/solr-exporter-diagram.png[image,width=600]
 
-This feature is experimental status.
+NOTE: This feature is considered experimental, meaning future improvements may break compatibility.
 
+The Prometheus exporter is included in Solr as a contrib, and is located in `contrib/prometheus-exporter` in your Solr instance.
 
-== Running solr-exporter
+There are three aspects to running `solr-exporter`:
 
-You can start solr-exporter by running `./bin/solr-exporter` from the solr-exporter directory.
+* Modify the `solr-exporter-config.xml` to define the data to collect. Solr has a default configuration you can use, but if you would like to modify it before running the exporter the first time, see the section below <<Exporter Configuration>>.
+* Start the exporter from within Solr. See the section below <<Starting the Exporter>>.
+* Modify your Prometheus configuration to listen on the correct port. See the section below <<Prometheus Configuration>>
 
-[source,plain]
+== Starting the Exporter
+You can start `solr-exporter` by running `./bin/solr-exporter` (Linux) or `.\bin\solr-exporter.cmd` (Windows) from the `contrib/prometheus-exporter` directory.
+
+See the commands below depending on your operating system and Solr operating mode:
+
+[.dynamic-tabs]
+--
+[example.tab-pane#solr-exporter-linux]
+====
+[.tab-label]*Linux*
+
+.Standalone mode
+[source,bash]
 ----
-$ cd ./contrib/prometheus-exporter
-$ ./bin/solr-exporter -p 9983 -b http://localhost:8983/solr -f ./conf/solr-exporter-config.xml -n 8
+$ cd contrib/prometheus-exporter
+$ ./bin/solr-exporter -p 9854 -b http://localhost:8983/solr -f ./conf/solr-exporter-config.xml -n 8
 ----
 
-If you are on Windows platform, you can start solr-exporter by running `.\bin\solr-exporter.cmd` instead.
-
-[source,plain]
+.SolrCloud mode
+[source,bash]
 ----
-> cd .\contrib\prometheus
-> .\bin\solr-exporter.cmd -p 9983 -b http://localhost:8983/solr -f .\conf\solr-exporter-config.xml -n 8
+$ cd contrib/prometheus-exporter
+$ ./bin/solr-exporter -p 9854 -z localhost:2181/solr -f ./conf/solr-exporter-config.xml -n 16
 ----
+====
 
-You can also connect to Solr in SolrCloud mode like this.
+[example.tab-pane#solr-exporter-windows]
+====
+[.tab-label]*Windows*
 
-[source,plain]
+.Standalone mode
+[source,text]
 ----
-$ cd ./contrib/prometheus
-$ ./bin/solr-exporter -p 9983 -z localhost:2181/solr -f ./conf/solr-exporter-config.xml -n 16
+> cd contrib\prometheus-exporter
+> .\bin\solr-exporter.cmd -p 9854 -b http://localhost:8983/solr -f .\conf\solr-exporter-config.xml -n 8
 ----
 
-See command help:
-
-[source,plain]
+.SolrCloud mode
+[source,text]
 ----
-$ ./bin/solr-exporter -h
+> cd contrib\prometheus-exporter
+> .\bin\solr-exporter -p 9854 -z localhost:2181/solr -f .\conf\solr-exporter-config.xml -n 16
 ----
+====
+--
 
 === Command Line Parameters
 
+The parameters in the example start commands shown above
+
+`h`, `--help`::
+Displays command line help and usage.
+
 `-p`, `--port`::
-Specify the solr-exporter HTTP listen port; default is `9983`.
+The port where Prometheus will listen for new data. This port will be used to configure Prometheus. It can be any port not already in use on your server. The default is `9983`.
 
 `-b`, `--baseurl`::
-Specify the Solr base URL when connecting to Solr in standalone mode. If omitted both the `-b` parameter and the `-z` parameter, connect to `http://localhost:8983/solr`. For example `http://localhost:8983/solr`.
+The Solr base URL (such as `\http://localhost:8983/solr`) when Solr is running in Standalone mode. If you are running Solr in SolrCloud mode, do not specify this parameter. If neither the `-b` parameter nor the `-z` parameter are defined, the default is `-b \http://localhost:8983/solr`.
 
 `-z`, `--zkhost`::
-Specify the ZooKeeper connection string when connecting to Solr in SolrCloud mode. If omitted both the `-b` parameter and the `-z` parameter, connect to `http://localhost:8983/solr`. For example `localhost:2181/solr`.
+The ZooKeeper connect string (such as `localhost:8983`, or `localhost:2181/solr`) when Solr is running in SolrCloud mode. If you are running Solr in Standalone mode, do not specify this parameter. If neither the `-b` parameter nor the `-z` parameter are defined, the `-b` parameter default is used.
 
 `-f`, `--config-file`::
-Specify the configuration file; default is `./conf/solr-exporter-config.xml`.
+The path to the configuration file that defines the Solr metrics to read. The default is `contrib/prometheus-exporter/conf/solr-exporter-config.xml`.
 
 `-n`, `--num-threads`::
-Specify the number of threads. solr-exporter creates a thread pools for request to Solr. If you need to improve request latency via solr-exporter, you can increase the number of threads; default is `1`.
-
-
-== Metrics Exposition URL
-
-The Solr's metrics exposed by solr-exporter can see at the following URL.
-
-http://localhost:9983/metrics[http://localhost:9983/metrics]
+The number of threads. The `solr-exporter` creates thread pools for requests to Solr. Request latency can be improved by increasing the number of threads. The default is `1`.
 
+The Solr's metrics exposed by `solr-exporter` can be seen at: `\http://localhost:9983/solr/admin/metrics`.
 
-== solr-exporter Configuration
+== Exporter Configuration
+The configuration for the `solr-exporter` defines the data to get from Solr. This includes the metrics, but can also include queries to the PingRequestHandler, the Collections API, and a query to any query request handler.
 
-The configuration is in `./config/solr-exporter-config.xml`. An example with all possible options:
+A default example configuration is in `contrib/prometheus-exporter/config/solr-exporter-config.xml`. Below is a slightly shortened version of it:
 
 [source,xml]
 ----
@@ -144,9 +166,7 @@ The configuration is in `./config/solr-exporter-config.xml`. An example with all
             value        : $value
             }
           </str>
-
 ...
-
         </arr>
       </lst>
     </metrics>
@@ -171,9 +191,7 @@ The configuration is in `./config/solr-exporter-config.xml`. An example with all
               value        : $value
             }
           </str>
-
 ...
-
         </arr>
       </lst>
     </collections>
@@ -220,43 +238,60 @@ The configuration is in `./config/solr-exporter-config.xml`. An example with all
 </config>
 ----
 
-===  solr-exporter Configuration Tags and Elements
+=== Configuration Tags and Elements
+The `solr-exporter` works by making a request to Solr according to the definitions in the configuration file, scraping the response, and converting it to a JSON structure Prometheus can understand. The configuration file defines the elements to request, how to scrape them, and where to place the extracted data in the JSON template.
 
-`/config/rules/ping`::
-Scrape <<ping.adoc#ping,Ping>> response.
+The `solr-exporter` configuration file always starts and closes with two simple elements:
 
-`/config/rules/metrics`::
-Scrape <<metrics-reporting.adoc#metrics-api,Metrics API>> response.
+[source,xml]
+----
+<config>
+  <rules>
 
-`/config/rules/collections`::
-Scrape <<collections-api.adoc#collections-api,Collections API>> response.
+  </rules>
+</config>
+----
+
+Between these elements, the data the `solr-exporter` should request is defined. There are several possible types of requests to make:
 
-`/config/rules/search`::
-Scrape <<searching.adoc#searching,Search API>> response.
+[horizontal]
+`<ping>`:: Scrape the response to a <<ping.adoc#ping,PingRequestHandler>> request.
+`<metrics>`:: Scrape the response to a <<metrics-reporting.adoc#metrics-api,Metrics API>> request.
+`<collections>`:: Scrape the response to a <<collections-api.adoc#collections-api,Collections API>> request.
+`<search>`:: Scrape the response to a <<searching.adoc#searching,search>> request.
 
-`*[@query]`::
-Query parameter for each features. You can specify `collection`, `core`, `path`, and `params`.
+Within each of these types, we need to define the query and how to work with the response. To do this, we define two additional elements:
 
-`*[@jsonQueries]`::
-JSON Query that is jq syntax. For more details, see https://stedolan.github.io/jq/manual/[https://stedolan.github.io/jq/manual/].
+`<query>`::
+Defines the query parameter(s) used for the request. This section uses several additional properties to define your query:
 
-jq query has to output JSON in the following format.
+`collection`::: The collection to issue the query against. Only used in SolrCloud mode.
+`core`::: The core to issue the query against. Only used in Standalone mode.
+`path`::: The path to the query endpoint where the request will be sent. Examples include `admin/metrics` or `/select` or `admin/collections`.
+`params`::: Additional query parameters. These will vary depending on the request type and the endpoint. For example, if using the Metrics endpoint, you can add parameters to limit the query to a certain group and/or prefix. If you're using the Collections API, the command you want to use would be a parameter.
 
+`<jsonQueries>`::
+This is an array that defines one or more JSON Queries in jq syntax. For more details about how to structure these queries, see https://stedolan.github.io/jq/manual/[the jq user manual].
++
+A jq query has to output JSON in the following format:
++
 [source,json]
 ----
 {
-  "name"         : "solr_ping",
-  "type"         : "GAUGE",
-  "help"         : "See following URL: https://lucene.apache.org/solr/guide/ping.html",
-  "label_names"  : ["base_url","core"],
-  "label_values" : ["http://localhost:8983/solr","collection1"],
-  "value"        : 1.0
+  "name": "solr_ping",
+  "type": "GAUGE",
+  "help": "See following URL: https://lucene.apache.org/solr/guide/ping.html",
+  "label_names": ["base_url","core"],
+  "label_values": ["http://localhost:8983/solr","collection1"],
+  "value": 1.0
 }
 ----
 
-===  solr-exporter Exposition Format
+See the section <<Exposition Format>> below for information about what information should go into each property, and an example of how the above example is translated for Prometheus.
 
-solr-exporter converts the JSON to the following exposition format:
+=== Exposition Format
+
+The `solr-exporter` converts the JSON to the following exposition format:
 
 [source,plain]
 ----
@@ -265,25 +300,27 @@ solr-exporter converts the JSON to the following exposition format:
 <name>{<label_names[0]>=<label_values[0]>,<label_names[1]>=<labelvalues[1]>,...} <value>
 ----
 
+The following parameters should be set:
+
 `name`::
-The metric name to set. For more details, see https://prometheus.io/docs/practices/naming/[https://prometheus.io/docs/practices/naming/].
+The metric name to set. For more details, see https://prometheus.io/docs/practices/naming/[Prometheus naming best practices].
 
 `type`::
-The type of the metric, can be `COUNTER`, `GAUGE`, `SUMMARY`, `HISTOGRAM` or `UNTYPED`. For more detauils, see https://prometheus.io/docs/concepts/metric_types/[https://prometheus.io/docs/concepts/metric_types/].
+The type of the metric, can be `COUNTER`, `GAUGE`, `SUMMARY`, `HISTOGRAM` or `UNTYPED`. For more details, see https://prometheus.io/docs/concepts/metric_types/[Prometheus metric types].
 
 `help`::
 Help text for the metric.
 
 `label_names`::
-Label names for the metric. For more details, see https://prometheus.io/docs/practices/naming/[https://prometheus.io/docs/practices/naming/].
+Label names for the metric. For more details, see https://prometheus.io/docs/practices/naming/[Prometheus naming best practices].
 
 `label_values`::
-Label values for the metric. For more details, see https://prometheus.io/docs/practices/naming/[https://prometheus.io/docs/practices/naming/].
+Label values for the metric. For more details, see https://prometheus.io/docs/practices/naming/[Prometheus naming best practices].
 
 `value`::
 Value for the metric. Value must be set to Double type.
 
-For example, solr-exporter converts the above JSON to the following:
+For example, `solr-exporter` converts the JSON in the previous section to the following:
 
 [source,plain]
 ----
@@ -292,27 +329,28 @@ For example, solr-exporter converts the above JSON to the following:
 solr_ping{base_url="http://localhost:8983/solr",core="collection1"} 1.0
 ----
 
-
 == Prometheus Configuration
 
-You need to specify the solr-exporter listen address into `scrape_configs` in `prometheus.yml`. See following example:
+In order for Prometheus to know about the `solr-exporter`, the listen address must be added to `prometheus.yml`, as in this example:
 
 [source,plain]
 ----
 scrape_configs:
   - job_name: 'solr'
     static_configs:
-      - targets: ['localhost:9983']
+      - targets: ['localhost:9854']
 ----
 
-When you apply the above settings to prometheus, it will start to pull Solr's metrics from solr-exporter.
+If you already have a section for `scrape_configs`, you can add the `job_name` and other values in the same section.
 
+When you apply the settings to Prometheus, it will start to pull Solr's metrics from `solr-exporter`.
 
-== Grafana Dashboard
+== Sample Grafana Dashboard
 
-A Grafana sample dashboard is provided at the following JSON file.
+A Grafana sample dashboard is provided in the following JSON file: `contrib/prometheus-exporter/conf/grafana-solr-dashboard.json`.
+You can place this with your other Grafana dashboard configurations and modify it as necessary depending on any customization you've done for the `solr-exporter` configuration.
 
-`./contrib/prometheus-exporter/conf/grafana-solr-dashboard.json`
+This screenshot shows what it might look like:
 
 .Grafana Dashboard
 image::images/monitoring-solr-with-prometheus-and-grafana/grafana-solr-dashboard.png[image,width=800]


[09/11] lucene-solr:jira/solr-11670-2: SOLR-12011: Remove unused import

Posted by ab...@apache.org.
SOLR-12011: Remove unused import


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1b8651db
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1b8651db
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1b8651db

Branch: refs/heads/jira/solr-11670-2
Commit: 1b8651db4f2656fdaf59dd0f44550766150ed829
Parents: 3c153cc
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Wed Mar 7 11:23:56 2018 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Wed Mar 7 11:23:56 2018 +0530

----------------------------------------------------------------------
 .../src/java/org/apache/solr/handler/admin/CollectionsHandler.java  | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1b8651db/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
index 13f0f98..70fb504 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
@@ -28,7 +28,6 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Optional;
-import java.util.OptionalLong;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import java.util.function.BiConsumer;


[11/11] lucene-solr:jira/solr-11670-2: Merge branch 'master' into jira/solr-11670-2

Posted by ab...@apache.org.
Merge branch 'master' into jira/solr-11670-2


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/4851f43a
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4851f43a
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4851f43a

Branch: refs/heads/jira/solr-11670-2
Commit: 4851f43ad49f862c301b9ea62dc5d6ada8a903bc
Parents: 163df9e 498927d
Author: Andrzej Bialecki <ab...@apache.org>
Authored: Wed Mar 7 13:33:01 2018 +0100
Committer: Andrzej Bialecki <ab...@apache.org>
Committed: Wed Mar 7 13:33:01 2018 +0100

----------------------------------------------------------------------
 dev-tools/doap/lucene.rdf                       |   7 +
 dev-tools/doap/solr.rdf                         |   7 +
 lucene/CHANGES.txt                              |   7 +
 .../index/TestBackwardsCompatibility.java       |   4 +-
 .../lucene/index/unsupported.6.6.3-cfs.zip      | Bin 0 -> 15919 bytes
 .../lucene/index/unsupported.6.6.3-nocfs.zip    | Bin 0 -> 15900 bytes
 solr/CHANGES.txt                                |  23 +++
 .../org/apache/solr/cloud/ZkShardTerms.java     |   3 +-
 .../cloud/autoscaling/ScheduledTrigger.java     |   4 +-
 .../cloud/autoscaling/ScheduledTriggers.java    |  60 +++---
 .../solr/handler/admin/CollectionsHandler.java  |  13 +-
 .../org/apache/solr/cloud/ZkShardTermsTest.java |  19 ++
 .../cloud/autoscaling/ScheduledTriggerTest.java |   1 -
 solr/solr-ref-guide/src/css/ref-guide.css       |   3 +-
 ...toring-solr-with-prometheus-and-grafana.adoc | 184 +++++++++++--------
 .../solrj/request/TestV1toV2ApiMapper.java      |  14 +-
 16 files changed, 223 insertions(+), 126 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4851f43a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTrigger.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4851f43a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
----------------------------------------------------------------------
diff --cc solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
index d2656cf,b46fd58..e313aaa
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
@@@ -224,21 -222,20 +224,21 @@@ public class ScheduledTriggers implemen
        }
        IOUtils.closeQuietly(old);
        newTrigger.restoreState(old.trigger);
-       scheduledTrigger.setReplay(false);
-       scheduledTriggers.replace(newTrigger.getName(), scheduledTrigger);
+       triggerWrapper.setReplay(false);
+       scheduledTriggerWrappers.replace(newTrigger.getName(), triggerWrapper);
      }
      newTrigger.setProcessor(event -> {
 +      TriggerListeners triggerListeners = listeners.copy();
        if (cloudManager.isClosed()) {
          String msg = String.format(Locale.ROOT, "Ignoring autoscaling event %s because Solr has been shutdown.", event.toString());
          log.warn(msg);
 -        listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.ABORTED, msg);
 +        triggerListeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.ABORTED, msg);
          return false;
        }
-       ScheduledTrigger scheduledSource = scheduledTriggers.get(event.getSource());
+       TriggerWrapper scheduledSource = scheduledTriggerWrappers.get(event.getSource());
        if (scheduledSource == null) {
          String msg = String.format(Locale.ROOT, "Ignoring autoscaling event %s because the source trigger: %s doesn't exist.", event.toString(), event.getSource());
 -        listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.FAILED, msg);
 +        triggerListeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.FAILED, msg);
          log.warn(msg);
          return false;
        }
@@@ -275,10 -272,10 +275,10 @@@
          if (replaying) {
            enqueued = false;
          } else {
-           enqueued = scheduledTrigger.enqueue(event);
+           enqueued = triggerWrapper.enqueue(event);
          }
          // fire STARTED event listeners after enqueuing the event is successful
 -        listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.STARTED);
 +        triggerListeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.STARTED);
          List<TriggerAction> actions = source.getActions();
          if (actions != null) {
            if (actionExecutor.isShutdown()) {
@@@ -311,13 -307,13 +311,13 @@@
                  }
                  List<String> afterActions = (List<String>) actionContext.getProperties().computeIfAbsent(TriggerEventProcessorStage.AFTER_ACTION.toString(), k -> new ArrayList<String>());
                  afterActions.add(action.getName());
 -                listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.AFTER_ACTION, action.getName(), actionContext);
 +                triggerListeners1.fireListeners(event.getSource(), event, TriggerEventProcessorStage.AFTER_ACTION, action.getName(), actionContext);
                }
                if (enqueued) {
-                 TriggerEvent ev = scheduledTrigger.dequeue();
+                 TriggerEvent ev = triggerWrapper.dequeue();
                  assert ev.getId().equals(event.getId());
                }
 -              listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.SUCCEEDED);
 +              triggerListeners1.fireListeners(event.getSource(), event, TriggerEventProcessorStage.SUCCEEDED);
              } catch (Exception e) {
                log.warn("Exception executing actions", e);
              } finally {


[07/11] lucene-solr:jira/solr-11670-2: Add 6.6.3 back compat test indexes

Posted by ab...@apache.org.
Add 6.6.3 back compat test indexes


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/28de8218
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/28de8218
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/28de8218

Branch: refs/heads/jira/solr-11670-2
Commit: 28de8218fee732077d91d52fb04e6abe427efdc7
Parents: eab33d0
Author: Steve Rowe <sa...@gmail.com>
Authored: Tue Mar 6 14:51:03 2018 -0500
Committer: Steve Rowe <sa...@gmail.com>
Committed: Tue Mar 6 14:51:03 2018 -0500

----------------------------------------------------------------------
 .../lucene/index/TestBackwardsCompatibility.java   |   4 +++-
 .../apache/lucene/index/unsupported.6.6.3-cfs.zip  | Bin 0 -> 15919 bytes
 .../lucene/index/unsupported.6.6.3-nocfs.zip       | Bin 0 -> 15900 bytes
 3 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/28de8218/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
----------------------------------------------------------------------
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
index f0d6740..4b66f9d 100644
--- a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
+++ b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
@@ -475,7 +475,9 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
       "6.6.1-cfs",
       "6.6.1-nocfs",
       "6.6.2-cfs",
-      "6.6.2-nocfs"
+      "6.6.2-nocfs",
+      "6.6.3-cfs",
+      "6.6.3-nocfs"
   };
 
   // TODO: on 6.0.0 release, gen the single segment indices and add here:

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/28de8218/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.3-cfs.zip
----------------------------------------------------------------------
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.3-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.3-cfs.zip
new file mode 100644
index 0000000..84c3624
Binary files /dev/null and b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.3-cfs.zip differ

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/28de8218/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.3-nocfs.zip
----------------------------------------------------------------------
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.3-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.3-nocfs.zip
new file mode 100644
index 0000000..6142083
Binary files /dev/null and b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.3-nocfs.zip differ


[10/11] lucene-solr:jira/solr-11670-2: SOLR-11066: Use timeZone.toZoneId instead of ZoneId.of(timeZoneString) because the latter cannot lookup short aliases

Posted by ab...@apache.org.
SOLR-11066: Use timeZone.toZoneId instead of ZoneId.of(timeZoneString) because the latter cannot lookup short aliases


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/498927d0
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/498927d0
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/498927d0

Branch: refs/heads/jira/solr-11670-2
Commit: 498927d0324374cfb37d97ae303154c84a07dad7
Parents: 1b8651d
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Wed Mar 7 17:22:36 2018 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Wed Mar 7 17:22:36 2018 +0530

----------------------------------------------------------------------
 .../java/org/apache/solr/cloud/autoscaling/ScheduledTrigger.java | 4 ++--
 .../org/apache/solr/cloud/autoscaling/ScheduledTriggerTest.java  | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/498927d0/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTrigger.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTrigger.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTrigger.java
index 1aa7a0a..6aeac2c 100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTrigger.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTrigger.java
@@ -20,7 +20,6 @@ package org.apache.solr.cloud.autoscaling;
 import java.lang.invoke.MethodHandles;
 import java.text.ParseException;
 import java.time.Instant;
-import java.time.ZoneId;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.temporal.ChronoField;
@@ -101,12 +100,13 @@ public class ScheduledTrigger extends TriggerBase {
       throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
           "Either 'startTime' should be an ISO-8601 date time string or 'timeZone' must be not be null");
     }
+    TimeZone timeZone = TimeZone.getTimeZone(timeZoneStr);
     DateTimeFormatter dateTimeFormatter = new DateTimeFormatterBuilder()
         .append(DateTimeFormatter.ISO_LOCAL_DATE).appendPattern("['T'[HH[:mm[:ss]]]]")
         .parseDefaulting(ChronoField.HOUR_OF_DAY, 0)
         .parseDefaulting(ChronoField.MINUTE_OF_HOUR, 0)
         .parseDefaulting(ChronoField.SECOND_OF_MINUTE, 0)
-        .toFormatter(Locale.ROOT).withZone(ZoneId.of(timeZoneStr));
+        .toFormatter(Locale.ROOT).withZone(timeZone.toZoneId());
     return Instant.from(dateTimeFormatter.parse(startTimeStr));
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/498927d0/solr/core/src/test/org/apache/solr/cloud/autoscaling/ScheduledTriggerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/ScheduledTriggerTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/ScheduledTriggerTest.java
index 6454224..6fedd95 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/ScheduledTriggerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/ScheduledTriggerTest.java
@@ -57,7 +57,6 @@ public class ScheduledTriggerTest extends SolrCloudTestCase {
   }
 
   @Test
-  @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
   public void testTrigger() throws Exception {
     CoreContainer container = cluster.getJettySolrRunners().get(0).getCoreContainer();
 


[08/11] lucene-solr:jira/solr-11670-2: SOLR-12011: FORCELEADER should also remove recovering flag of a replica so it can win the election

Posted by ab...@apache.org.
SOLR-12011: FORCELEADER should also remove recovering flag of a replica so it can win the election


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/3c153ccd
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/3c153ccd
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/3c153ccd

Branch: refs/heads/jira/solr-11670-2
Commit: 3c153ccd0e649cec361846a41cd518c7fc64d902
Parents: 28de821
Author: Cao Manh Dat <da...@apache.org>
Authored: Wed Mar 7 09:09:52 2018 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Wed Mar 7 09:09:52 2018 +0700

----------------------------------------------------------------------
 .../java/org/apache/solr/cloud/ZkShardTerms.java |  3 ++-
 .../solr/handler/admin/CollectionsHandler.java   | 12 +++---------
 .../org/apache/solr/cloud/ZkShardTermsTest.java  | 19 +++++++++++++++++++
 3 files changed, 24 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3c153ccd/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java b/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java
index 50b424c..ca79982 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkShardTerms.java
@@ -194,7 +194,7 @@ public class ZkShardTerms implements AutoCloseable{
   }
 
   /**
-   * Set a replica's term equals to leader's term.
+   * Set a replica's term equals to leader's term, and remove recovering flag of a replica.
    * This call should only be used by {@link org.apache.solr.common.params.CollectionParams.CollectionAction#FORCELEADER}
    * @param coreNodeName of the replica
    */
@@ -554,6 +554,7 @@ public class ZkShardTerms implements AutoCloseable{
 
       HashMap<String, Long> newValues = new HashMap<>(values);
       newValues.put(coreNodeName, maxTerm);
+      newValues.remove(coreNodeName+"_recovering");
       return new Terms(newValues, version);
     }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3c153ccd/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
index f4855eb..13f0f98 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
@@ -1148,16 +1148,10 @@ public class CollectionsHandler extends RequestHandlerBase implements Permission
           .noneMatch(rep -> zkShardTerms.registered(rep.getName()) && zkShardTerms.canBecomeLeader(rep.getName()));
       // we won't increase replica's terms if exist a live replica with term equals to leader
       if (shouldIncreaseReplicaTerms) {
-        OptionalLong optionalMaxTerm = liveReplicas.stream()
+        //TODO only increase terms of replicas less out-of-sync
+        liveReplicas.stream()
             .filter(rep -> zkShardTerms.registered(rep.getName()))
-            .mapToLong(rep -> zkShardTerms.getTerm(rep.getName()))
-            .max();
-        // increase terms of replicas less out-of-sync
-        if (optionalMaxTerm.isPresent()) {
-          liveReplicas.stream()
-              .filter(rep -> zkShardTerms.getTerm(rep.getName()) == optionalMaxTerm.getAsLong())
-              .forEach(rep -> zkShardTerms.setTermEqualsToLeader(rep.getName()));
-        }
+            .forEach(rep -> zkShardTerms.setTermEqualsToLeader(rep.getName()));
       }
 
       // Wait till we have an active leader

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3c153ccd/solr/core/src/test/org/apache/solr/cloud/ZkShardTermsTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/ZkShardTermsTest.java b/solr/core/src/test/org/apache/solr/cloud/ZkShardTermsTest.java
index d557b29..c7f1cdb 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ZkShardTermsTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ZkShardTermsTest.java
@@ -229,6 +229,25 @@ public class ZkShardTermsTest extends SolrCloudTestCase {
     replicaTerms.close();
   }
 
+  public void testSetTermEqualsToLeader() throws InterruptedException {
+    String collection = "setTermEqualsToLeader";
+    ZkShardTerms leaderTerms = new ZkShardTerms(collection, "shard1", cluster.getZkClient());
+    ZkShardTerms replicaTerms = new ZkShardTerms(collection, "shard1", cluster.getZkClient());
+    leaderTerms.registerTerm("leader");
+    replicaTerms.registerTerm("replica");
+
+    leaderTerms.ensureTermsIsHigher("leader", Collections.singleton("replica"));
+    waitFor(false, () -> replicaTerms.canBecomeLeader("replica"));
+    waitFor(true, () -> leaderTerms.skipSendingUpdatesTo("replica"));
+
+    replicaTerms.setTermEqualsToLeader("replica");
+    waitFor(true, () -> replicaTerms.canBecomeLeader("replica"));
+    waitFor(false, () -> leaderTerms.skipSendingUpdatesTo("replica"));
+
+    leaderTerms.close();
+    replicaTerms.close();
+  }
+
   private <T> void waitFor(T expected, Supplier<T> supplier) throws InterruptedException {
     TimeOut timeOut = new TimeOut(10, TimeUnit.SECONDS, new TimeSource.CurrentTimeSource());
     while (!timeOut.hasTimedOut()) {


[04/11] lucene-solr:jira/solr-11670-2: SOLR-11066: Renamed the internal ScheduledTriggers.ScheduledTrigger inner class to TriggerWrapper to avoid confusion with the ScheduledTrigger added in this issue

Posted by ab...@apache.org.
SOLR-11066: Renamed the internal ScheduledTriggers.ScheduledTrigger inner class to TriggerWrapper to avoid confusion with the ScheduledTrigger added in this issue


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/8b9a1adb
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/8b9a1adb
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/8b9a1adb

Branch: refs/heads/jira/solr-11670-2
Commit: 8b9a1adbae20309b4bda1583ad08bf7978b4323a
Parents: be11f56
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Wed Mar 7 00:25:51 2018 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Wed Mar 7 00:26:03 2018 +0530

----------------------------------------------------------------------
 .../cloud/autoscaling/ScheduledTriggers.java    | 60 ++++++++++----------
 1 file changed, 30 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8b9a1adb/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
index 0f2b705..b46fd58 100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
@@ -87,7 +87,7 @@ public class ScheduledTriggers implements Closeable {
     DEFAULT_PROPERTIES.put(ACTION_THROTTLE_PERIOD_SECONDS, DEFAULT_ACTION_THROTTLE_PERIOD_SECONDS);
   }
 
-  private final Map<String, ScheduledTrigger> scheduledTriggers = new ConcurrentHashMap<>();
+  private final Map<String, TriggerWrapper> scheduledTriggerWrappers = new ConcurrentHashMap<>();
 
   /**
    * Thread pool for scheduling the triggers
@@ -157,10 +157,10 @@ public class ScheduledTriggers implements Closeable {
           case TRIGGER_SCHEDULE_DELAY_SECONDS:
             triggerDelay.set(((Number) newProps.get(key)).intValue());
             synchronized (this) {
-              scheduledTriggers.forEach((s, scheduledTrigger) -> {
-                if (scheduledTrigger.scheduledFuture.cancel(false)) {
-                  scheduledTrigger.scheduledFuture = scheduledThreadPoolExecutor.scheduleWithFixedDelay(
-                      scheduledTrigger, 0,
+              scheduledTriggerWrappers.forEach((s, triggerWrapper) -> {
+                if (triggerWrapper.scheduledFuture.cancel(false)) {
+                  triggerWrapper.scheduledFuture = scheduledThreadPoolExecutor.scheduleWithFixedDelay(
+                      triggerWrapper, 0,
                       cloudManager.getTimeSource().convertDelay(TimeUnit.SECONDS, triggerDelay.get(), TimeUnit.MILLISECONDS),
                       TimeUnit.MILLISECONDS);
                 } else  {
@@ -198,9 +198,9 @@ public class ScheduledTriggers implements Closeable {
     if (isClosed) {
       throw new AlreadyClosedException("ScheduledTriggers has been closed and cannot be used anymore");
     }
-    ScheduledTrigger st;
+    TriggerWrapper st;
     try {
-      st = new ScheduledTrigger(newTrigger, cloudManager, queueStats);
+      st = new TriggerWrapper(newTrigger, cloudManager, queueStats);
     } catch (Exception e) {
       if (isClosed) {
         throw new AlreadyClosedException("ScheduledTriggers has been closed and cannot be used anymore");
@@ -212,9 +212,9 @@ public class ScheduledTriggers implements Closeable {
       }
       return;
     }
-    ScheduledTrigger scheduledTrigger = st;
+    TriggerWrapper triggerWrapper = st;
 
-    ScheduledTrigger old = scheduledTriggers.putIfAbsent(newTrigger.getName(), scheduledTrigger);
+    TriggerWrapper old = scheduledTriggerWrappers.putIfAbsent(newTrigger.getName(), triggerWrapper);
     if (old != null) {
       if (old.trigger.equals(newTrigger)) {
         // the trigger wasn't actually modified so we do nothing
@@ -222,8 +222,8 @@ public class ScheduledTriggers implements Closeable {
       }
       IOUtils.closeQuietly(old);
       newTrigger.restoreState(old.trigger);
-      scheduledTrigger.setReplay(false);
-      scheduledTriggers.replace(newTrigger.getName(), scheduledTrigger);
+      triggerWrapper.setReplay(false);
+      scheduledTriggerWrappers.replace(newTrigger.getName(), triggerWrapper);
     }
     newTrigger.setProcessor(event -> {
       if (cloudManager.isClosed()) {
@@ -232,7 +232,7 @@ public class ScheduledTriggers implements Closeable {
         listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.ABORTED, msg);
         return false;
       }
-      ScheduledTrigger scheduledSource = scheduledTriggers.get(event.getSource());
+      TriggerWrapper scheduledSource = scheduledTriggerWrappers.get(event.getSource());
       if (scheduledSource == null) {
         String msg = String.format(Locale.ROOT, "Ignoring autoscaling event %s because the source trigger: %s doesn't exist.", event.toString(), event.getSource());
         listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.FAILED, msg);
@@ -272,7 +272,7 @@ public class ScheduledTriggers implements Closeable {
         if (replaying) {
           enqueued = false;
         } else {
-          enqueued = scheduledTrigger.enqueue(event);
+          enqueued = triggerWrapper.enqueue(event);
         }
         // fire STARTED event listeners after enqueuing the event is successful
         listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.STARTED);
@@ -310,7 +310,7 @@ public class ScheduledTriggers implements Closeable {
                 listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.AFTER_ACTION, action.getName(), actionContext);
               }
               if (enqueued) {
-                TriggerEvent ev = scheduledTrigger.dequeue();
+                TriggerEvent ev = triggerWrapper.dequeue();
                 assert ev.getId().equals(event.getId());
               }
               listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.SUCCEEDED);
@@ -327,9 +327,9 @@ public class ScheduledTriggers implements Closeable {
           });
         } else {
           if (enqueued) {
-            TriggerEvent ev = scheduledTrigger.dequeue();
+            TriggerEvent ev = triggerWrapper.dequeue();
             if (!ev.getId().equals(event.getId())) {
-              throw new RuntimeException("Wrong event dequeued, queue of " + scheduledTrigger.trigger.getName()
+              throw new RuntimeException("Wrong event dequeued, queue of " + triggerWrapper.trigger.getName()
               + " is broken! Expected event=" + event + " but got " + ev);
             }
           }
@@ -346,7 +346,7 @@ public class ScheduledTriggers implements Closeable {
       }
     });
     newTrigger.init(); // mark as ready for scheduling
-    scheduledTrigger.scheduledFuture = scheduledThreadPoolExecutor.scheduleWithFixedDelay(scheduledTrigger, 0,
+    triggerWrapper.scheduledFuture = scheduledThreadPoolExecutor.scheduleWithFixedDelay(triggerWrapper, 0,
         cloudManager.getTimeSource().convertDelay(TimeUnit.SECONDS, triggerDelay.get(), TimeUnit.MILLISECONDS),
         TimeUnit.MILLISECONDS);
   }
@@ -357,9 +357,9 @@ public class ScheduledTriggers implements Closeable {
    */
   public synchronized void pauseTriggers()  {
     if (log.isDebugEnabled()) {
-      log.debug("Pausing all triggers: {}", scheduledTriggers.keySet());
+      log.debug("Pausing all triggers: {}", scheduledTriggerWrappers.keySet());
     }
-    scheduledTriggers.forEach((s, scheduledTrigger) -> scheduledTrigger.scheduledFuture.cancel(false));
+    scheduledTriggerWrappers.forEach((s, triggerWrapper) -> triggerWrapper.scheduledFuture.cancel(false));
   }
 
   /**
@@ -368,10 +368,10 @@ public class ScheduledTriggers implements Closeable {
    * @lucene.internal
    */
   public synchronized void resumeTriggers(long afterDelayMillis) {
-    scheduledTriggers.forEach((s, scheduledTrigger) ->  {
-      if (scheduledTrigger.scheduledFuture.isCancelled()) {
+    scheduledTriggerWrappers.forEach((s, triggerWrapper) ->  {
+      if (triggerWrapper.scheduledFuture.isCancelled()) {
         log.debug("Resuming trigger: {} after {}ms", s, afterDelayMillis);
-        scheduledTrigger.scheduledFuture = scheduledThreadPoolExecutor.scheduleWithFixedDelay(scheduledTrigger, afterDelayMillis,
+        triggerWrapper.scheduledFuture = scheduledThreadPoolExecutor.scheduleWithFixedDelay(triggerWrapper, afterDelayMillis,
             cloudManager.getTimeSource().convertDelay(TimeUnit.SECONDS, triggerDelay.get(), TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS);
       }
     });
@@ -454,7 +454,7 @@ public class ScheduledTriggers implements Closeable {
    * @param triggerName the name of the trigger to be removed
    */
   public synchronized void remove(String triggerName) {
-    ScheduledTrigger removed = scheduledTriggers.remove(triggerName);
+    TriggerWrapper removed = scheduledTriggerWrappers.remove(triggerName);
     IOUtils.closeQuietly(removed);
     removeTriggerZKData(triggerName);
   }
@@ -478,7 +478,7 @@ public class ScheduledTriggers implements Closeable {
    * @return an unmodifiable set of names of all triggers being managed by this class
    */
   public synchronized Set<String> getScheduledTriggerNames() {
-    return Collections.unmodifiableSet(new HashSet<>(scheduledTriggers.keySet())); // shallow copy
+    return Collections.unmodifiableSet(new HashSet<>(scheduledTriggerWrappers.keySet())); // shallow copy
   }
 
   @Override
@@ -486,10 +486,10 @@ public class ScheduledTriggers implements Closeable {
     synchronized (this) {
       // mark that we are closed
       isClosed = true;
-      for (ScheduledTrigger scheduledTrigger : scheduledTriggers.values()) {
-        IOUtils.closeQuietly(scheduledTrigger);
+      for (TriggerWrapper triggerWrapper : scheduledTriggerWrappers.values()) {
+        IOUtils.closeQuietly(triggerWrapper);
       }
-      scheduledTriggers.clear();
+      scheduledTriggerWrappers.clear();
     }
     // shutdown and interrupt all running tasks because there's no longer any
     // guarantee about cluster state
@@ -498,14 +498,14 @@ public class ScheduledTriggers implements Closeable {
     listeners.close();
   }
 
-  private class ScheduledTrigger implements Runnable, Closeable {
+  private class TriggerWrapper implements Runnable, Closeable {
     AutoScaling.Trigger trigger;
     ScheduledFuture<?> scheduledFuture;
     TriggerEventQueue queue;
     boolean replay;
     volatile boolean isClosed;
 
-    ScheduledTrigger(AutoScaling.Trigger trigger, SolrCloudManager cloudManager, Stats stats) throws IOException {
+    TriggerWrapper(AutoScaling.Trigger trigger, SolrCloudManager cloudManager, Stats stats) throws IOException {
       this.trigger = trigger;
       this.queue = new TriggerEventQueue(cloudManager, trigger.getName(), stats);
       this.replay = true;
@@ -545,7 +545,7 @@ public class ScheduledTriggers implements Closeable {
         // to change the schedule delay, we can safely cancel the old scheduled task
         // and create another one with the new delay without worrying about concurrent
         // execution of the same trigger instance
-        synchronized (ScheduledTrigger.this) {
+        synchronized (TriggerWrapper.this) {
           // replay accumulated events on first run, if any
           if (replay) {
             TriggerEvent event;


[05/11] lucene-solr:jira/solr-11670-2: Add version 6.6.3

Posted by ab...@apache.org.
Add version 6.6.3


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/e5541bcf
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/e5541bcf
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/e5541bcf

Branch: refs/heads/jira/solr-11670-2
Commit: e5541bcfa1cb77778b296c8870461ffd3363bf64
Parents: 8b9a1ad
Author: Steve Rowe <sa...@gmail.com>
Authored: Tue Mar 6 13:12:59 2018 -0500
Committer: Steve Rowe <sa...@gmail.com>
Committed: Tue Mar 6 14:39:35 2018 -0500

----------------------------------------------------------------------
 lucene/CHANGES.txt |  3 +++
 solr/CHANGES.txt   | 17 +++++++++++++++++
 2 files changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e5541bcf/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 3d2775f..27df1b2 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -732,6 +732,9 @@ Other
   that are trivially replaced by LeafReader.terms() and MultiFields.getTerms()
   (David Smiley)
 
+======================= Lucene 6.6.3 =======================
+(No Changes)
+
 ======================= Lucene 6.6.2 =======================
 
 Changes in Runtime Behavior

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e5541bcf/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index f398c0b..f4b74a7 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -1693,6 +1693,23 @@ Other Changes
 
 * SOLR-11324: Clean up mention of trie fields in documentation and source comments. (Steve Rowe)
 
+==================  6.6.3 ==================
+
+Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+
+Versions of Major Components
+---------------------
+Apache Tika 1.17
+Carrot2 3.15.0
+Velocity 1.7 and Velocity Tools 2.0
+Apache UIMA 2.3.1
+Apache ZooKeeper 3.4.11
+Jetty 9.4.8.v20171121
+
+
+(No Changes)
+
+
 ==================  6.6.2 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.


[02/11] lucene-solr:jira/solr-11670-2: SOLR-12061: Comment out failing test

Posted by ab...@apache.org.
SOLR-12061: Comment out failing test


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2ff27ca5
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/2ff27ca5
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/2ff27ca5

Branch: refs/heads/jira/solr-11670-2
Commit: 2ff27ca507c9bf3921b9c6a4eabcb737b7cb6921
Parents: 378d799
Author: Tomas Fernandez Lobbe <tf...@apache.org>
Authored: Tue Mar 6 10:14:58 2018 -0800
Committer: Tomas Fernandez Lobbe <tf...@apache.org>
Committed: Tue Mar 6 10:14:58 2018 -0800

----------------------------------------------------------------------
 .../client/solrj/request/TestV1toV2ApiMapper.java     | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2ff27ca5/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestV1toV2ApiMapper.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestV1toV2ApiMapper.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestV1toV2ApiMapper.java
index ae563f1..7dd4e06 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestV1toV2ApiMapper.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestV1toV2ApiMapper.java
@@ -51,13 +51,13 @@ public class TestV1toV2ApiMapper extends LuceneTestCase {
     assertEquals("shard1", Utils.getObjectByPath(m,true,"/add-replica/shard"));
     assertEquals("NRT", Utils.getObjectByPath(m,true,"/add-replica/type"));
 
-    CollectionAdminRequest.CollectionProp collectionProp = CollectionAdminRequest.setCollectionProperty("mycoll", "prop", "value");
-    v2r = V1toV2ApiMapper.convert(collectionProp).build();
-    m = (Map) Utils.fromJSON(ContentStreamBase.create(new BinaryRequestWriter(), v2r).getStream());
-    assertEquals("/c", v2r.getPath());
-    assertEquals("mycoll", Utils.getObjectByPath(m,true,"/set-collection-property/name"));
-    assertEquals("prop", Utils.getObjectByPath(m,true,"/set-collection-property/propertyName"));
-    assertEquals("value", Utils.getObjectByPath(m,true,"/set-collection-property/propertyValue"));
+//    CollectionAdminRequest.CollectionProp collectionProp = CollectionAdminRequest.setCollectionProperty("mycoll", "prop", "value");
+//    v2r = V1toV2ApiMapper.convert(collectionProp).build();
+//    m = (Map) Utils.fromJSON(ContentStreamBase.create(new BinaryRequestWriter(), v2r).getStream());
+//    assertEquals("/c", v2r.getPath());
+//    assertEquals("mycoll", Utils.getObjectByPath(m,true,"/set-collection-property/name"));
+//    assertEquals("prop", Utils.getObjectByPath(m,true,"/set-collection-property/name"));
+//    assertEquals("value", Utils.getObjectByPath(m,true,"/set-collection-property/value"));
 
 
   }


[06/11] lucene-solr:jira/solr-11670-2: Synchronize 6.6.3 changes

Posted by ab...@apache.org.
Synchronize 6.6.3 changes


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/eab33d00
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/eab33d00
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/eab33d00

Branch: refs/heads/jira/solr-11670-2
Commit: eab33d00a0a4dcbedac6b8daa432f62ec91fa2aa
Parents: e5541bc
Author: Steve Rowe <sa...@gmail.com>
Authored: Tue Mar 6 14:40:27 2018 -0500
Committer: Steve Rowe <sa...@gmail.com>
Committed: Tue Mar 6 14:40:27 2018 -0500

----------------------------------------------------------------------
 lucene/CHANGES.txt | 6 +++++-
 solr/CHANGES.txt   | 8 +++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/eab33d00/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 27df1b2..fc22c7d 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -733,7 +733,11 @@ Other
   (David Smiley)
 
 ======================= Lucene 6.6.3 =======================
-(No Changes)
+
+Build
+
+* LUCENE-6144: Upgrade Ivy to 2.4.0; 'ant ivy-bootstrap' now removes old Ivy
+  jars in ~/.ant/lib/.  (Shawn Heisey, Steve Rowe)
 
 ======================= Lucene 6.6.2 =======================
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/eab33d00/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index f4b74a7..3dc4b45 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -1706,9 +1706,15 @@ Apache UIMA 2.3.1
 Apache ZooKeeper 3.4.11
 Jetty 9.4.8.v20171121
 
+Bug Fixes
+----------------------
 
-(No Changes)
+* SOLR-11971: Don't allow referal to external resources in DataImportHandler's dataConfig request parameter.
+  (麦 香浓郁, Uwe Schindler)
+
+* SOLR-11503: Collections created with legacyCloud=true cannot be opened if legacyCloud=false (Erick Erickson)
 
+* SOLR-11993: LeaderInitiatedRecoveryThread does not retry on UnknownHostException (shalin, Cao Manh Dat, Steve Rowe)
 
 ==================  6.6.2 ==================