Commit Graph

904 Commits

Author SHA1 Message Date
Ilan Ginzburg e7c80f6445
SOLR-15157: refactor Collection API to separate from Overseer and message handling abstractions (#2390)
No functional changes. In preparation of distributing the Collection API command execution.
2021-02-19 14:40:23 +01:00
Jason Gerlowski c3f6e12876 Resolve AbstractCloudBackupRestoreTestCase flakiness
The 'testBackupAndRestore' method in this class was asserting that the
collection created by restore had the expected number of cores-per-node,
but the logic to compute that expected cores-per-node value failed to
account for a rarely-triggered branch that adds a 'createNodeSet' param
to the restore.

This commit updates the test logic to compute the expected
cores-per-node value when createNodeSet is passed.
2021-02-17 16:02:50 -05:00
Jason Gerlowski 15bd858d34
SOLR-15087: Allow restoration to existing collections (#2380)
The recent addition of support for a "readonly" mode for collections
opens the door to restoring to already-existing collections.

This commit adds a codepath to allow this.  Any compatible existing
collection may be used for restoration, including the collection that
was the original source of the backup.
2021-02-16 21:59:24 -05:00
Jason Gerlowski f993c392f1
SOLR-15101: Add list/delete APIs for incremental backups (#2336)
SOLR-13608 introduces a new "incremental" backup format, which allows
storage of multiple backup "points" in the same location. This
development introduces a need for APIs to manage these potentially
plural backups.

This commit introduces /admin/collections?action=LISTBACKUPS and
/admin/collections?action=DELETEBACKUP to handle these backups.
2021-02-15 07:04:05 -05:00
Ilan Ginzburg 23755ddfdd
SOLR-14928: allow cluster state updates to be done in a distributed way and not through Overseer (#2364) 2021-02-13 02:42:18 +01:00
Jason Gerlowski 33d16b570c
SOLR-13608: Incremental backup file format (#2250)
This commit introduces a new way for Solr to do backups (with a new
underlying file structure).  This new "incremental" backup process
improves over the existing backup mechanism in several ways:

- multiple backups "points" can now be stored at a given backup
  location/name, allowing users to choose which point in time they want
  to restore
- subsequent backups skip over uploading files that were uploaded by
  previous backups, saving time and network time.
- files are checksumed as they're uploaded, ensuring that corrupted
  indices aren't persisted and accidentally restored later.

Incremental backups are now the default, and traditional backups
should now be considered 'deprecated' but can still be created by
passing an `incremental=false` parameter on backup requests.
2021-02-04 08:47:30 -05:00
Mike Drob 99748384cf
SOLR-14253 Replace sleep calls with ZK waits (#1297)
Co-Authored-By: markrmiller <markrmiller@apache.org>
2021-02-01 13:25:17 -06:00
Eric Pugh 6d71a0aced
SOLR-14067: v4 Create /contrib/scripting module with ScriptingUpdateProcessor (#2257)
* Creating Scripting contrib module to centralize the less secure code related to scripts.

* tweak the changelog and update notice to explain why the name changed and the security posture thinking

* the test script happens to be a currency.xml, which made me think we were doing something specific to currency types, but instead any xml formatted file will suffice for the test.

* Update solr/contrib/scripting/src/java/org/apache/solr/scripting/update/ScriptUpdateProcessorFactory.java

* Update solr/contrib/scripting/src/java/org/apache/solr/scripting/update/package-info.java

* drop the ing, and be more specific on the name of the ref guide page

* comment out the script update chain.

The sample techproducts configSet is used by many of the solr unit tests, and by default doesn't have access to the jar file in the contrib module.   This is commented out, similar to how the lang contrib is.

* using a Mock for the script processor in order to keep the trusted configSets tests all together.

* tweak since we are using a mock script processor

Co-authored-by: David Smiley <dsmiley@apache.org>
2021-01-29 12:27:36 -05:00
Tim Dillon a7a434dbc4
SOLR-15025: MiniSolrCloudCluster.waitForAllNodes ignores passed timeout value (#2193)
* Change timeout values to seconds
2021-01-29 11:22:06 -06:00
Tim Owen 715caaae52
SOLR-15085 Prevent EmbeddedSolrServer calling shutdown on a CoreContainer that was passed to it 2021-01-29 11:15:22 -06:00
Mike Drob b335034615
Require Thread Names in Solr (#2264)
When we are creating a new thread we should give it a descriptive name and enforce this via ForbiddenAPIs. This doesn't apply to Runnable or Callable objects that we pass to an executor, since those should be getting named by the executor itself.

We don't require this in tests because the tests should be more self contained and there is less benefit in descriptive names. If somebody is already profiling a test, then they likely have the context to understand what the unnamed threads are doing, whereas a thread dump from a running Solr instance should have good thread names for everything. This is especially helpful when doing profiling, otherwise we end up with a bunch of Thread-# that are hard to tell apart and search on.
2021-01-28 15:04:15 -06:00
epugh@opensourceconnections.com ce1bba6d66 Revert "SOLR-14067: v3 Create /contrib/scripting module with ScriptingUpdateProcessor (#2215)"
This reverts commit cf5db8d651.
2021-01-25 09:53:36 -05:00
Eric Pugh cf5db8d651
SOLR-14067: v3 Create /contrib/scripting module with ScriptingUpdateProcessor (#2215)
* Creating Scripting contrib module to centralize the less secure code related to scripts.

* tweak the changelog and update notice to explain why the name changed and the security posture thinking

* the test script happens to be a currency.xml, which made me think we were doing something specific to currency types, but instead any xml formatted file will suffice for the test.

* drop the ing, and be more specific on the name of the ref guide page

* use the same name everywhere

Co-authored-by: David Smiley <dsmiley@apache.org>
2021-01-21 13:32:46 -05:00
Noble Paul 8505d4d416
SOLR-15052: Per-replica states for reducing overseer bottlenecks (trunk) (#2177) 2021-01-19 02:59:41 +11:00
Chris Hostetter 05a8477a36 SOLR-14934: Fix some additional test helper methods that aren't used on master but triggered problems when when backporting to branch_8x 2020-12-02 13:35:33 -07:00
Chris Hostetter 8732df8c50 SOLR-14934: test workaround for SOLR-15026 2020-12-02 12:13:55 -07:00
Chris Hostetter 2e6a02394e SOLR-14934: Refactored duplicate "Solr Home" logic into a single place to eliminate risk of tests using divergent values for a single solr node. 2020-12-02 10:24:36 -07:00
Timothy Potter a0492840ee
SOLR-12182: Don't persist base_url in ZK as the scheme is variable, compute from node_name instead (#2010) 2020-11-30 12:05:48 -07:00
Chris Hostetter 37a61635e1 SOLR-14958: Refactor zkHost config logic to make testing easier and reduce risk of incorrect value being used 2020-11-30 10:43:08 -07:00
Andrzej Bialecki 2a3da99e2d SOLR-14914: Add option to disable metrics collection. 2020-10-15 10:14:16 +02:00
Erick Erickson f6c4f8a755 SOLR-14910: Use in-line tags for logger declarations in Gradle ValidateLogCalls that are non-standard, change //logok to //nowarn 2020-10-03 09:47:37 -04:00
Tomoko Uchida 5e617ccc33
LUCENE-9317: Clean up split package in analyzers-common (#1836) 2020-09-28 16:49:28 +09:00
Tomas Fernandez Lobbe f1921b99b4
Improve TestConfigSetsAPI (#1892)
* Replace Auth plugin with mocks

* Remove unused password param

* Start cluster only once

* Use SolrCloudTestCase

* Use MiniSolrCloudCluster's methods to remove collections and configsets
2020-09-21 10:03:47 -07:00
Robert Muir 784ede4eda
LUCENE-9215: replace checkJavaDocs.py with doclet (#1802)
This has the same logic as the previous python, but no longer relies
upon parsing HTML output, instead using java's doclet processor.

The errors are reported like "normal" javadoc errors with source file
name and line number and happen when running "gradlew javadoc"

Although the "rules" are the same as the previous python, the python had
some bugs where the checker didn't quite do exactly what we wanted, so
some fixes were applied throughout.

Co-authored-by: Dawid Weiss <dawid.weiss@carrotsearch.com>
Co-authored-by: Uwe Schindler <uschindler@apache.org>
2020-09-02 08:29:17 -04:00
Ishan Chattopadhyaya d84977eb5c SOLR-14616: Remove CDCR 2020-08-29 02:13:13 +05:30
Erick Erickson 69fa5a00fb LUCENE-9433: Remove Ant support from trunk 2020-08-28 09:31:16 -04:00
Erick Erickson c9c75810c2 Revert "LUCENE-9433: Remove Ant support from trunk"
This reverts commit 37cd17dc
2020-08-21 16:57:58 -04:00
Erick Erickson 37cd17dcf5 LUCENE-9433: Remove Ant support from trunk 2020-08-21 15:19:52 -04:00
Dawid Weiss 5375a2d2ad
LUCENE-9454: upgrade hamcrest to version 2.2. (#1738) 2020-08-11 11:55:52 +02:00
Cao Manh Dat 57b0160659
SOLR-14641: PeerSync, remove canHandleVersionRanges check (#1663) 2020-08-10 15:04:34 +07:00
Atri Sharma a074418da0
SOLR-13528: Implement Request Rate Limiters (#1686)
This commit introduces two functionalities: request rate limiting and ability to identify requests based on type (indexing, search, admin). The default rate limiter rate limits query requests based on configurable parameters which can be set in web.xml. Note that this rate limiting works at a JVM level, not a core/collection level.
2020-08-08 01:36:06 +05:30
David Smiley a3624029ad
SOLR-14651: Metrics History could disable better (#1672)
* SolrRrdBackendFactory should not be created if history is disabled
* Disable MetricsHistoryHandler by default in tests
* Await shutdown of all executors
2020-07-28 16:46:27 -04:00
Erick Erickson f3de646560 SOLR-13939: Extract any non-gradle related patches (deprecations, URL fixes, etc.) from gradle effort (thread leaks) 2020-07-15 09:23:27 -04:00
Andrzej Bialecki cf742f4596 SOLR-12847: Remove support for maxShardsPerNode. 2020-07-08 17:57:24 +02:00
Cao Manh Dat a80eb84d56
SOLR-14354: HttpShardHandler send requests in async (#1470) 2020-07-07 09:17:26 +07:00
Erick Erickson 76e1d901cb SOLR-14592: Upgrade Zookeeper to 3.6.1 2020-07-01 19:47:16 -04:00
Jan Høydahl 49a3f0a11d
SOLR-14561 Followup - validate params for more core operations (#1629)
Add template to solr.in scripts
Also testes Windows paths
Added RefGuide documentation to some params
2020-06-29 13:18:24 +02:00
David Smiley aa5b26f6c4
Remove some needless toAbsolutePath calls (#1582) 2020-06-21 16:28:25 -04:00
Erick Erickson 07a203628e SOLR-14455: Fix or suppress warnings in solr/test-framework 2020-06-10 18:05:50 -04:00
Munendra S N 53040984f6 SOLR-14345: return correct err msg when non-binary resp parser is used
* This adds support to parse error properly in case of non-binary
  resp parser but the problem still exists for noopResponseParser
2020-06-10 19:11:52 +05:30
Mike Drob 8ee6e6797b
SOLR-14548 Address warning: static member should be qualified by type… (#1555) 2020-06-09 15:33:37 -05:00
murblanc 1ab9b811c6
SOLR-12823: remove /clusterstate.json (#1528)
* SOLR-12823: remove /clusterstate.json

Remove all code dealing with Zookeeper's /clusterstate.json, remove Collection API's MIGRATESTATEVERSION, remove legacyCloud option.

Also fixes SOLR-11877 DocCollection.getStateFormat is buggy

Co-authored-by: Ilan Ginzburg <iginzburg@salesforce.com>
2020-06-09 13:59:17 -05:00
Erick Erickson ae3de57b33 SOLR-14538: Fix or suppress remaining warnings in apache/solr/handler 2020-06-05 15:22:44 -04:00
Erick Erickson bab4fccba2 SOLR-14533: Fix or suppress warnings in solr/handler/admin 2020-06-04 07:02:55 -04:00
Uwe Schindler 06df50e759
LUCENE-9321: Port markdown task to Gradle (#1477) 2020-05-17 14:46:26 +02:00
Erick Erickson 217c2faa2c LUCENE-7788: fail precommit on unparameterised log messages and examine for wasted work/objects 2020-05-01 13:06:57 -04:00
Erick Erickson 9ae05e9b4f LUCENE-7788: fail precommit on unparameterised log messages and examine for wasted work/objects 2020-04-30 19:50:31 -04:00
Tomoko Uchida f03e6aac59
SOLR-14429: Convert .txt files to properly formatted .md files (#1450) 2020-04-27 08:43:04 +09:00
Simon Willnauer d7e0b906ab
LUCENE-9345: Separate MergeSchedulder from IndexWriter (#1451)
This change extracts the methods that are used by MergeScheduler into
a MergeSource interface. This allows IndexWriter to better ensure
locking, hide internal methods and removes the tight coupling between the two
complex classes. This will also improve future testing.
2020-04-24 15:02:55 +02:00
Shalin Shekhar Mangar 13f19f6555 SOLR-9906: SolrjNamedThreadFactory is deprecated in favor of SolrNamedThreadFactory. DefaultSolrThreadFactory is removed from solr-core in favor of SolrNamedThreadFactory in solrj package and all solr-core classes now use SolrNamedThreadFactory 2020-04-13 08:16:35 +05:30