Commit Graph

340 Commits

Author SHA1 Message Date
Ryan Ernst df22e54baf Move forbidden api signature files to dev-tools.
This avoids the files showing up in the binary release, since .txt files
are copied.

closes #7917
closes #7921
2014-09-29 15:27:43 -07:00
Simon Willnauer 20a0c68964 [BUILD] Release version should match latest version
This commit ensures that the latest version in our code is identical
to the project.version specified in the pom.xml file.
2014-09-29 17:45:10 +02:00
mikemccand 6bf635039c Core: upgrade to Lucene 4.10.1 2014-09-28 13:42:12 -04:00
Michael McCandless 5e9e2cf50c Core: try again to upgrade to Lucene 4.10.1-snapshot 2014-09-24 13:48:49 -04:00
Michael McCandless ab3be76644 Revert Lucene upgrade 2014-09-24 13:25:55 -04:00
Michael McCandless 15c75b1967 Core: upgrade to Lucene 4.10.1 snapshot
Lucene will soon release official 4.10.1, but by upgrading sooner we can 1) sidestep the false failures due to the 1.8.0_20 JVM hotspot bug (has caused a number of false failures in recent Jenkins tests), 2) make sure none of the Lucene changes in 4.10.1 are problematic.

Closes #7844
2014-09-24 13:13:07 -04:00
Simon Willnauer 38d88b2e2c [TEST] Added basic test for InternalTestCluster reproducibility 2014-09-09 21:48:42 +02:00
Britta Weber 59ce940d43 [TESTS]: create directory for heapdumps if not exists
Before the heapdump was either written in a file with the
directory name if the heapdump path ended without / or
not written at all if the path ended with /

closes #7645
2014-09-08 21:21:05 +02:00
mikemccand 130fdef367 Core: remove built-in support for Lucene's experimental codecs
Lucene's experimental codecs (from the codecs module) do not provide
backwards compatibility and are free to change from release to
release.  When they do change, they typically cannot in general read
older indices and the resulting exceptions look like index corruption.
So, we are removing built-in support for them to prevent applications
from choosing one and then seeing strange exceptions on upgrade.

Closes #7566

Closes #7604
2014-09-08 04:55:15 -04:00
Robert Muir 223dab8921 [Lucene] Upgrade to Lucene 4.10
Closes #7584
2014-09-05 12:21:08 -04:00
Adrien Grand b49853a619 Internal: Upgrade Guava to 18.0.
17.0 and earlier versions were affected by the following bug
https://code.google.com/p/guava-libraries/issues/detail?id=1761
which caused caches that are configured with weights that are greater than
32GB to actually be unbounded. This is now fixed.

Relates to #6268
Close #7593
2014-09-04 20:14:59 +02:00
Boaz Leskes 598854dd72 [Discovery] accumulated improvements to ZenDiscovery
Merging the accumulated work from the feautre/improve_zen branch. Here are the highlights of the changes:

__Testing infra__
- Networking:
    - all symmetric partitioning
    - dropping packets
    - hard disconnects
    - Jepsen Tests
- Single node service disruptions:
    - Long GC / Halt
    - Slow cluster state updates
- Discovery settings
    - Easy to setup unicast with partial host list

__Zen Discovery__
- Pinging after master loss (no local elects)
- Fixes the split brain issue: #2488
- Batching join requests
- More resilient joining process (wait on a publish from master)

Closes #7493
2014-09-01 16:13:57 +02:00
Boaz Leskes 183ca37dfa Code style improvement 2014-08-29 09:01:05 +02:00
Britta Weber 44dbd9b0c9 test: write heap dump to log folder
Per default the heap dump is written to target/JX/pidXYZ.hprof
In order to keep them when a new test is is started, they
should be written to log folder which is not cleared in a new
test run.
Heap dump location can be set with -Dtests.heapdump.path=/path/to/heapdump

closes #7452
2014-08-28 14:51:10 +02:00
Boaz Leskes 50f852ffeb [TEST] Added LongGCDisruption and a test simulating GC on master nodes
Also rename DiscoveryWithNetworkFailuresTests to DiscoveryWithServiceDisruptions which better suites what we do.
2014-08-27 15:47:40 +02:00
Alexander Reelsen e478f24b9e Dependencies: Upgrade to Apache HttpComponents client 4.3.5
Closes #7342
2014-08-22 09:44:13 +02:00
Britta Weber 5bfd75e489 Test: write heap dump per default
The heap dump is always interesting in case a test causes an OOM.
Per default is is written to target/JX/pidXYZ.hprof
2014-08-21 15:59:32 +02:00
Shay Banon 3da5773dd9 Upgrade to Jackson Smile 2.4.1.1
This fixes issue 18 in Smile (https://github.com/FasterXML/jackson-dataformat-smile/issues/18)

closes #7327
2014-08-19 11:10:54 -07:00
Shay Banon fc405f6f8a Upgrade to Netty 3.9.3.Final
closes #7328
2014-08-19 11:09:35 -07:00
Robert Muir f85554d6ef Merge pull request #7158 from uschindler/forbiddenapis-1.6-update
Update forbidden-apis to 1.6

Closes #7158
2014-08-15 10:28:27 -04:00
Ryan Ernst c1b6e53cbb Internal: Fix a very rare case of corruption in compression used for
internal cluster communication.

See CorruptedCompressorTests for details on how this bug can be hit.
This change also removes the ability to use the unsafe variant of
ChunkedEncoder, removing support for the compress.lzf.decoder setting.
2014-08-11 07:26:09 -07:00
Alexander Reelsen 9e4064a9ba Dependencies: Version bump HPPC to 0.6.0 2014-08-08 08:20:07 +02:00
Uwe Schindler 28622e49f7 Update forbidden-apis to 1.6 2014-08-05 00:57:18 +02:00
Alexander Reelsen 3c83c0f9d7 Dependencies: Randomized testing version bump 2014-08-04 09:29:16 +02:00
uboness 5f0719fd50 Added CliToolTestCase's sub classes to the test jar 2014-08-03 22:18:33 +02:00
uboness 45714b1977 Added CliToolTestCase to the test jar 2014-08-03 21:10:25 +02:00
uboness 5ccc7beaf4 Added a cli infrastructure
CliTool is a base class for command-line interface tools (such as the plugin manager and potentially others). It supports the following:
  - single or multi command tool
  - help printing infrastructure (based on help files)
  - consistent mechanism of parsing arguments (based on commons-cli lib)
  - separation of argument parsing and command execution (for easier unit testing)
  - terminal abstraction (will use System.console() when available)
2014-08-02 17:16:27 +02:00
Simon Willnauer 196b56d47a [BUILD] Add profile that skips all validations
This commit adds a profile that skips all validation ie.
 - nocommit / tabs checking
 - forbidden API checks
 - license headers

It's not active by default but can easily be activated with
  `mvn -Pdev` or in the `~/.m2/settings.xml`

for reference see:
  http://maven.apache.org/guides/introduction/introduction-to-profiles.html
2014-07-31 15:22:11 +02:00
Simon Willnauer d2493ea48a [CORE] Support parsing lucene minor version strings
We parse the version that is shipped with the Lucene segments in order
to find the version of lucene that wrote a particular segment. Yet, some lucene
version ie:
 * 4.3.1 (Elasticsearch 0.90.2)
 * 4.5.1 (Elasticsearch 0.90.7)
 * 3.6.1 (pre Elasticsearch 0.90.0)

wrote illegal strings containing the minor version which causes IAE exceptions
being thrown from lucenes parsing method.

Closes #7055
2014-07-28 13:02:00 +02:00
Adrien Grand bf4bdcce73 Build: Remove UnsafeUtils from forbidden-apis exclusion list. 2014-07-23 09:30:51 +02:00
Ryan Ernst 64ab22816c Scripting: Add script engine for lucene expressions.
These are javascript expressions, which can only access numeric
fielddata, parameters, and _score. They can only be used for searches (not document updates).

closes #6818
2014-07-15 07:49:01 -07:00
Shay Banon 386a14370a Upgrade to jackson core 2.4.1.1
Note, we had to disable the symbol overflow, since the many mapping case was tripping it
closes #6789
2014-07-09 17:49:51 +02:00
Alexander Reelsen ec92646289 Build: Add all netty classes during shading
In order to have access to all codecs and handlers by netty, they
need to be exposed during shading, otherwise only the classes, which
are used by the built are exposed.
2014-07-07 15:09:36 +02:00
Shay Banon 5093f050ab Upgrade Jackson to 2.4.1
closes #6757
2014-07-07 09:49:53 +02:00
Simon Willnauer 9ddfaf3aaf [TEST] Expose `tests.filter` for elasticsearch tests.
`-Dtests.filter` allows to pass filter expressions to the elasticsearch
tests. This allows to filter test annotaged with TestGroup annotations
like @Slow, @Nightly, @Backwards, @Integration with a boolean expresssion like:

 * to run only backwards tests run:
     `mvn -Dtests.bwc.version=X.Y.Z -Dtests.filter="@backwards"`
 * to run all integration tests but skip slow tests run:
     `mvn -Dtests.filter="@integration and not @slow"
 * to take defaults into account ie run all test as well as backwards:
     `mvn -Dtests.filter="default and @backwards"

This feature is a more powerful alternative to flags like
`-Dtests.nighly=true|false` etc.

Closes #6703
2014-07-03 11:40:49 +02:00
Boaz Leskes 72d2ac1328 Better support for partial buffer reads/writes in translog infrastructure
Some IO api can return after writing & reading only a part of the requested data. On these rare occasions, we should call the methods again to read/write the rest of the data. This has cause rare translog corruption while writing huge documents on Windows.

Noteful parts of the commit:
- A new Channels class with utility methods for reading and writing to channels
- Writing or reading to channels is added to the forbidden API list
- Added locking to SimpleFsTranslogFile
- Removed FileChannelInputStream which was not used

Closes #6441 , #6576
2014-07-01 19:11:36 +02:00
Robert Muir b55ad98d73 Upgrade to Lucene 4.9 (closes #6623) 2014-06-26 08:18:59 -04:00
Lee Hinman 50bb274efa Remove MVEL as a built-in scripting language 2014-06-26 10:33:28 +02:00
Lee Hinman 2708e453ac Re-shade MVEL as a dependency 2014-06-20 11:28:50 +02:00
Lee Hinman c70f6d0171 Add Groovy as a scripting language, add sandboxing for Groovy
Sandboxes the groovy scripting language with multiple configurable
whitelists:

`script.groovy.sandbox.receiver_whitelist`: comma-separated list of string
classes for objects that may have methods invoked.
`script.groovy.sandbox.package_whitelist`: comma-separated list of
packages under which new objects may be constructed.
`script.groovy.sandbox.class_whitelist` comma-separated list of classes
that are allowed to be constructed.

As well as a method blacklist:

`script.groovy.sandbox.method_blacklist`: comma-separated list of
methods that are never allowed to be invoked, regardless of target
object.

The sandbox can be entirely disabled by setting:

`script.groovy.sandbox.enabled: false`
2014-06-20 10:20:16 +02:00
Britta Weber ef05334fdd don't check .metadata folder for tabs and nocommits 2014-06-17 12:07:13 +02:00
Simon Willnauer 4dfa822e1b [TEST] Add basic Backwards Compatibility Tests
This commit add a basic infrastructure as well as primitive tests
to ensure version backwards compatibility between the current
development trunk and an arbitrary previous version. The compatibility
tests are simple unit tests derived from a base class that starts
and manages nodes from a provided elasticsearch release package.

Use the following commandline executes all backwards compatiblity tests
in isolation:

```
mvn test -Dtests.bwc=true -Dtests.bwc.version=1.2.1 -Dtests.class=org.elasticsearch.bwcompat.*
```

These tests run basic checks like rolling upgrades and
routing/searching/get etc. against the specified version. The version
must be present in the `./backwards` folder as
`./backwards/elasticsearch-x.y.z`
2014-06-16 12:40:43 +02:00
Simon Willnauer b8537d0e95 [BUILD] exclude target dir from tab validation 2014-06-12 12:31:18 +02:00
Nik Everett 29c10ed1bb [BUILD] Generate source jars for tests
Closes #6125
2014-06-12 12:05:54 +02:00
Simon Willnauer 5575ba1a12 [BUILD] Check for tabs and nocommits in the code on validate
This commit adds checks for nocommit and tabs in the source code.
The task is executed during the validate phase and can be disabled via
`-Dvalidate.skip`
2014-06-12 11:11:23 +02:00
mikemccand a71bb13563 Compilation: don't warn about using Sun proprietary APIs
E.g. we use Unsafe in quite a few places and this generates lots of
warnings, which we now suppress using the undocumented
-XDignore.symbol.file command-line option to javac.

Closes #6423
2014-06-06 05:46:06 -04:00
mikemccand af30947b66 get -Dtests.verbose passing through Maven 2014-06-05 09:38:10 -04:00
Adrien Grand 7ab99de483 Routing: Restore shard routing.
Routing has been inadvertly changed in #5562 resulting in documents going to
different shards in 1.2. This is a terrible bug because an indexing request
would not necessarily go to the same shard anymore, potentially leading to
duplicates.

Close #6391
2014-06-03 16:37:54 +02:00
Simon Willnauer ea80b381c0 [BUILD] Java version line was missleading
calling `java -version` might not print the java version that
is actually used to run maven. This commit prints a more accurate version
2014-06-02 15:51:38 +02:00
Shay Banon b2c7c8b0e7 Upgrade to netty 3.9.1
closes #6331
2014-05-30 00:20:37 +02:00