Skip to content

Commit

Permalink
Merge pull request #268 from untergeek/fix/267
Browse files Browse the repository at this point in the history
Bloom filters were disabled in 1.4

Tests successfully on my box.
  • Loading branch information
untergeek committed Feb 10, 2015
2 parents 886f336 + 87bcd79 commit 292dc78
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ Contributors:
* Christian Vozar (christianvozar)
* Magnus Baeck (magnusbaeck)
* Robin Kearney (rk295)
* (cfeio)
1 change: 1 addition & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changelog
**Bug fixes**

* Fix edge case where trying to optimize an empty index causes an error. #265 (untergeek)
* Bloom filters were disabled in ES 1.4, rather than delayed to 1.5. Reported in #267 (untergeek)


2.1.2 (22 January 2015)
Expand Down
4 changes: 2 additions & 2 deletions curator/curator.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,14 +546,14 @@ def disable_bloom_filter(client, index_name, **kwargs):
:arg client: The Elasticsearch client connection
:arg index_name: The index name
"""
no_more_bloom = (1, 5, 0)
no_more_bloom = (1, 4, 0)
version_number = get_version(client)
if index_closed(client, index_name): # Don't try to disable bloom filter on a closed index. It will re-open them
logger.info('Skipping index {0}: Already closed.'.format(index_name))
return True
else:
if version_number >= no_more_bloom:
logger.info('Skipping index {0}: Bloom filters no longer exist in Elasticsearch since v1.5.0'.format(index_name))
logger.info('Skipping index {0}: Bloom filters no longer exist in Elasticsearch since v1.4.0'.format(index_name))
else:
client.indices.put_settings(index=index_name, body='index.codec.bloom.load=false')

Expand Down
4 changes: 2 additions & 2 deletions test_curator/integration/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class TestBloomIndex(CuratorTestCase):
def test_bloom_filter_will_be_disabled(self):
self.create_index('test_index')
self.assertIsNone(curator.disable_bloom_filter(self.client, 'test_index'))
# Bloom filters have been removed from the 1.x branch after 1.5.0
no_more_bloom = (1, 5, 0)
# Bloom filters have been removed from the 1.x branch after 1.4.0
no_more_bloom = (1, 4, 0)
version_number = curator.get_version(self.client)
if version_number < no_more_bloom:
settings = self.client.indices.get_settings(index='test_index')
Expand Down

0 comments on commit 292dc78

Please sign in to comment.