Commit Graph

116 Commits (59fdf22d9681c6e5585d11eec4f4bc15b0705239)

Author SHA1 Message Date
David Norton c88db39524 Revert derivative change 2014-11-25 20:43:20 -05:00
John Shahid 1f5f5cb789 Don't write points if they are too old
Background of the bug: Prior to this patch we actually tried writing
points that were older than the retention period of the shard. This
caused race condition when it came to writing points to a shard that's
being dropped, which will happen frequently if the user is loading old
data (by accident). This is demonstrated in the test in this commit.This
bug was previously addressed in #985. It turns the fix for #985 wasn't
enough. A user reported in #1078 that some shards are left behind and
not deleted.

It turns out that while the shard is being dropped more write
requests could come in and end up on line `cluster/shard.go:195` which
will cause the datastore to create a shard on disk that isn't tracked
anywhere in the metadata. This shard will live forever and never get
deleted. This fix address this issue by not writing old points in, but
there are still some edge cases with the current implementation, at
least not as bad as current master.

Close #1078
2014-11-03 17:28:47 -05:00
John Shahid 63b11691eb Merge remote-tracking branch 'refs/remotes/origin/pr/973' 2014-11-03 14:06:08 -05:00
John Shahid 87ef0d13e9 don't enable raft debug log by default 2014-10-31 14:50:04 -04:00
John Shahid 3a857296f4 Support joining multiple series using regex or list 2014-10-31 14:49:48 -04:00
John Shahid f9b3a27345 Make the raft logging configurable 2014-10-30 16:03:13 -04:00
John Shahid 1b50c7d310 Revert "Use rocksdb in the data test suite" (info below)
This reverts commit 49c49d818c.

In order to use rocksdb we need g++ >= 4.7 (which has support for
C++0x11). It's too expensive to build g++ every time. Upgrading the
ubuntu distro used by travis seems to be coming soon, I'll shelf this
for now until travis-ci/travis-ci#2046 is resolved.
2014-10-29 16:52:00 -04:00
David Norton 309934dec5 Fill even when no points exists in the given time range
Fix #996. Close #1067
2014-10-29 16:37:17 -04:00
John Shahid caba1b2d7a add trace to the available logging levels 2014-10-29 16:31:32 -04:00
John Shahid 49c49d818c Use rocksdb in the data test suite 2014-10-28 16:19:45 -04:00
John Shahid c265f1f588 Delete shards only after making sure no has a reference to it.
* shard_datastore.go(Deleteshard): Check the reference count of the
  shard and mark it for deletion if there are still more references out
  there. Otherwise, delete the shard immediately. Also refactor the
  deletion code in deleteShard(), see below.
* shard_datastore.go(ReturnShard): Check to see if the shard is marked
  for deletion.
* shard_datastore.go(deleteShard): Refactor the code that used to be in
  Deleteshard in its own method. Use `closeShard` instead of doing the
  cleanup ourselves.
2014-10-24 16:36:45 -04:00
Todd Persen 638db64681 Merge pull request #778 from influxdb/issue-778
misleading error trying to select from non-existent series
2014-10-23 12:37:19 -04:00
John Shahid b1646cb68d Make the error message clear when a series is missing
Fix #778
2014-10-23 12:23:42 -04:00
John Shahid d3b6c1b010 FromClause.GetString() shouldn't assume 2 series in the merge
Fix #1047
2014-10-22 15:22:59 -04:00
John Shahid e8be7575c8 rename a test file 2014-10-21 17:57:13 -04:00
John Shahid 7839677804 Return the merged data using the alias
Since we return an error if the same series has more than one alias this
fixes #270
2014-10-21 17:57:13 -04:00
John Shahid 465614c173 Modify merge to work with regex 2014-10-21 17:57:13 -04:00
David Norton 403881854c Fix derivative when there is a group by time() and fill
Fix #334
2014-10-21 17:19:04 -04:00
Todd Persen 9f89aaeb26 Aggregating by time should respect the natural boundaries of the argument.
Fix #387
2014-10-20 15:24:39 -04:00
John Shahid 4c655ddc3d fixup! Querying for data outside of existing shards should return an empty response. 2014-10-15 12:27:15 -04:00
Todd Persen f16f4b6639 Querying for data outside of existing shards should return an empty response.
Fix #1004. Close #1023
2014-10-14 12:59:47 -04:00
John Shahid 74dad10845 Revert "Run the data test suite using rocksdb since it's the default"
This reverts commit ec6e06c224.

Currently travis doesn't support g++ 4.7 which is required to build
rocksdb. This is causing the test suite to fail
2014-10-14 12:55:20 -04:00
Todd Persen e27cba06e5 Fix typo in test name. 2014-10-11 21:34:59 -04:00
John Shahid ec6e06c224 Run the data test suite using rocksdb since it's the default 2014-10-10 16:11:17 -04:00
John Shahid da4f56fbbb Don't use the same server id more than once
Fix #972
2014-10-07 18:32:14 -04:00
John Shahid 0ca44c906d Merge branch '0.8'
Conflicts:
	api/http/api.go
	cluster/cluster_configuration.go
	cluster/cluster_configuration_test.go
	coordinator/coordinator.go
	engine/aggregator_operators.go
	engine/common_merge_engine.go
	integration/data_test.go
	parser/parser.go
2014-09-24 18:55:19 -04:00
John Shahid cdff908655 Remove an unused test 2014-09-24 18:06:03 -04:00
John Shahid e131fbc777 Parse big int in query's where clause properly
Fix #964
2014-09-24 18:06:03 -04:00
David Norton e796eea997 Add a test for #939 2014-09-24 18:06:03 -04:00
David Norton a649f6b623 Refactor the integration tests
Conflicts:
	integration/data_test.go
2014-09-24 18:06:03 -04:00
David Norton 26a71ad9a6 Refactor data_test.go to use Test* function names
Refactor integration/data_test.go to use Test* names for the tests
and remove the TestAll test case, which uses reflection to iterate
over all test functions.  Also, change the two SingleServerSuite
test functions in this file to DataTestSuite functions.

The DataTestSuite now conforms to standard Go / gocheck test
conventions.  Individual tests can be run.  Groups of tests can be
run by specifying patterns.  E.g.,

make integraton_test only=DataTestSuite

...will run all tests in data_test.go.  Or,

make integration_test only=DataTestSuite.Test.*Histogram

...will run all histogram related tests.

See the gocheck documentation for further details.

Conflicts:
	integration/data_test.go
2014-09-24 18:06:03 -04:00
John Shahid b652c1d377 Fix the test as a result of 25cc979
Conflicts:
	integration/multiple_servers_test.go
2014-09-24 18:05:50 -04:00
David Norton 2482f69d31 Fix #780 so that fill works with all aggregates
Conflicts:
	engine/aggregator.go
	integration/data_test.go
2014-09-24 17:49:43 -04:00
John Shahid e816973bf6 Don't panic on invalid boolean operators
Close #714
2014-09-24 17:40:29 -04:00
Paul Dix 7f8c4778f6 Move cluster config from raft to API.
Fixes #853. Close #854. Previously, there was an unprotected endpoint in
raft to return the cluster config that would include user hashes. This
endpoint is useful for debugging purposes so I restructured it and moved
it to the API. It ensures the requesting user is a cluster admin.

Cluster config will now return all of the cluster state including
servers, CQs, shards, etc.

Conflicts:
	integration/single_server_test.go
2014-09-24 17:40:29 -04:00
John Shahid b7a145e717 Fix case insensitive regex matching
Close #794

Conflicts:
	integration/data_test.go
2014-09-24 17:40:29 -04:00
John Shahid 42bef2508c Return an error if an invalid column is used to filter after a join
Fix #652
2014-09-24 17:40:29 -04:00
John Shahid de68a3877b Parse big int in query's where clause properly
Fix #964
2014-09-23 11:46:14 -04:00
David Norton 3497cffd21 Add a test for #939 2014-09-22 16:50:58 -04:00
David Norton a7fbbe08e8 Refactor the integration tests 2014-09-22 16:50:58 -04:00
John Shahid 6df047f855 Fix the test as a result of 25cc979 2014-09-18 14:44:09 -04:00
John Shahid 4b92d96cb4 Merge remote-tracking branch 'refs/remotes/origin/pr/920'
Conflicts:
	integration/data_test.go
2014-09-12 13:14:33 -04:00
David Norton e310d10b5f Refactor data_test.go to use Test* function names
Refactor integration/data_test.go to use Test* names for the tests
and remove the TestAll test case, which uses reflection to iterate
over all test functions.  Also, change the two SingleServerSuite
test functions in this file to DataTestSuite functions.

The DataTestSuite now conforms to standard Go / gocheck test
conventions.  Individual tests can be run.  Groups of tests can be
run by specifying patterns.  E.g.,

make integraton_test only=DataTestSuite

...will run all tests in data_test.go.  Or,

make integration_test only=DataTestSuite.Test.*Histogram

...will run all histogram related tests.

See the gocheck documentation for further details.
2014-09-12 00:13:41 -04:00
David Norton 08fb0c5997 Fix #780 so that fill works with all aggregates 2014-09-12 00:12:40 -04:00
John Shahid 886885cfd7 wait for the continuous queries to run 2014-09-11 11:45:00 -04:00
John Shahid 5004cbbd57 split on the name of the series 2014-09-11 11:28:18 -04:00
Paul Dix f0c0abdb10 Add option to include space to series mappings in list series query.
Fixes #867. Close #927. Updated lexer and parser to work, added code to
coordinator to insert spaces if requested. Now the user can request the
shard spaces. `list series include spaces`
2014-09-11 11:28:18 -04:00
Dieter Plaetinck 6bba3ab988 actually use prefix in CreateSeries integration helper 2014-09-10 18:39:16 -04:00
John Shahid 5669346054 cleanup the storage keys and point iteration in the shard's code 2014-09-10 14:08:07 -04:00
David Norton 3556fb6b51 Refactor TestAll test loop in data_test.go
Combine the three separate loops for DB creation, running setup
functions, and running tests into one loop.  Add a DB delete at the
end of each test for cleanup.

This groups output for each test together in one place.  It also has
the advantage of not running all DB creations and setup functions until
they're needed.
2014-09-10 06:24:11 -04:00