76c1b2cdb6 
								
							 
						 
						
							
							
								
								Ensure correct block order on reload  
							
							... 
							
							
							
							Due to a regression blocks were no longer ordered by time before
being stored in memory. This made data intermittently become unavailable
for queries.
Signed-off-by: Fabian Reinartz <freinartz@google.com> 
							
						 
						
							2018-05-28 16:00:36 -04:00  
				
					
						
							
							
								 
						
							
								64cce683cc 
								
							 
						 
						
							
							
								
								gofmt -s.  
							
							... 
							
							
							
							Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com> 
							
						 
						
							2018-05-07 15:39:54 +03:00  
				
					
						
							
							
								 
						
							
								15b5d89222 
								
							 
						 
						
							
							
								
								db: Addressed comments.  
							
							... 
							
							
							
							Signed-off-by: Bartek Plotka <bwplotka@gmail.com> 
							
						 
						
							2018-04-05 14:15:24 +01:00  
				
					
						
							
							
								 
						
							
								cc306ef0d5 
								
							 
						 
						
							
							
								
								Added grouping by overlap range.  
							
							... 
							
							
							
							Signed-off-by: Bartek Plotka <bwplotka@gmail.com> 
							
						 
						
							2018-04-05 13:51:33 +01:00  
				
					
						
							
							
								 
						
							
								7412e2b44b 
								
							 
						 
						
							
							
								
								Added more cases and modified one var name.  
							
							... 
							
							
							
							Signed-off-by: Bartek Plotka <bwplotka@gmail.com> 
							
						 
						
							2018-03-29 12:50:46 +01:00  
				
					
						
							
							
								 
						
							
								f07d829946 
								
							 
						 
						
							
							
								
								db: Tiny tuning of algo + added proper print.  
							
							... 
							
							
							
							Signed-off-by: Bartek Plotka <bwplotka@gmail.com> 
							
						 
						
							2018-03-28 23:50:42 +01:00  
				
					
						
							
							
								 
						
							
								1e60f02066 
								
							 
						 
						
							
							
								
								db: Simplified tests.  
							
							... 
							
							
							
							Signed-off-by: Bartek Plotka <bwplotka@gmail.com> 
							
						 
						
							2018-03-28 23:19:22 +01:00  
				
					
						
							
							
								 
						
							
								51ce1cc7ff 
								
							 
						 
						
							
							
								
								db: Fixed validateBlockSequence.  
							
							... 
							
							
							
							Signed-off-by: Bartek Plotka <bwplotka@gmail.com> 
							
						 
						
							2018-03-28 18:33:41 +01:00  
				
					
						
							
							
								 
						
							
								a9b28a6aa0 
								
							 
						 
						
							
							
								
								db: Added tests for validateBlockSequence to confirm a bug.  
							
							... 
							
							
							
							(That's why test fails)
Signed-off-by: Bartek Plotka <bwplotka@gmail.com> 
							
						 
						
							2018-03-28 15:50:52 +01:00  
				
					
						
							
							
								 
						
							
								8cd32d8fd4 
								
							 
						 
						
							
							
								
								Improve usability of snapshots  
							
							
							
						 
						
							2018-02-28 12:07:34 +01:00  
				
					
						
							
							
								 
						
							
								eb6cdbcb5b 
								
							 
						 
						
							
							
								
								some test funcitons didn't cleanup after themselves.  
							
							
							
						 
						
							2018-02-23 18:45:59 +02:00  
				
					
						
							
							
								 
						
							
								e9fc37be61 
								
							 
						 
						
							
							
								
								Count the total and failed block cutoffs  
							
							
							
						 
						
							2018-01-11 10:22:59 +01:00  
				
					
						
							
							
								 
						
							
								3158b03e6c 
								
							 
						 
						
							
							
								
								Select series with label unset for != and !~  
							
							... 
							
							
							
							Fixes https://github.com/prometheus/prometheus/issues/3575 
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com> 
							
						 
						
							2017-12-19 02:47:31 +00:00  
				
					
						
							
							
								 
						
							
								667b5575e9 
								
							 
						 
						
							
							
								
								Close db so that file space is reclaimed immediately after delete.  
							
							... 
							
							
							
							Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in> 
							
						 
						
							2017-12-10 12:02:01 -06:00  
				
					
						
							
							
								 
						
							
								ca4e817372 
								
							 
						 
						
							
							
								
								move test utils to it's own package so we can use it in tests for other packages in tsdb repo  
							
							
							
						 
						
							2017-12-06 17:06:14 -08:00  
				
					
						
							
							
								 
						
							
								670c2917e2 
								
							 
						 
						
							
							
								
								use test utils in db_test  
							
							
							
						 
						
							2017-12-06 15:18:42 -08:00  
				
					
						
							
							
								 
						
							
								30bbbe34f8 
								
							 
						 
						
							
							
								
								Merge pull request  #210  from Gouthamve/tomb-clean  
							
							... 
							
							
							
							Add a function to cleanup tombstones. 
							
						 
						
							2017-11-30 15:28:01 +05:30  
				
					
						
							
							
								 
						
							
								f35e9c7fec 
								
							 
						 
						
							
							
								
								Merge branch 'master' into fix-dels  
							
							... 
							
							
							
							Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in> 
							
						 
						
							2017-11-30 13:30:13 +05:30  
				
					
						
							
							
								 
						
							
								8a5ea9db74 
								
							 
						 
						
							
							
								
								Merge branch 'master' into tomb-clean  
							
							... 
							
							
							
							Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in> 
							
						 
						
							2017-11-30 13:15:23 +05:30  
				
					
						
							
							
								 
						
							
								24ff293dc9 
								
							 
						 
						
							
							
								
								Merge pull request  #207  from Gouthamve/compact-fail  
							
							... 
							
							
							
							Don't retry failed compactions. 
							
						 
						
							2017-11-30 12:58:19 +05:30  
				
					
						
							
							
								 
						
							
								e7445d00b0 
								
							 
						 
						
							
							
								
								Add a function to cleanup tombstones.  
							
							... 
							
							
							
							Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in> 
							
						 
						
							2017-11-27 20:03:37 +05:30  
				
					
						
							
							
								 
						
							
								17dd4f8f6c 
								
							 
						 
						
							
							
								
								Merge pull request  #213  from Gouthamve/close-retention-blocks  
							
							... 
							
							
							
							Close the retention blocks before deleting them. 
							
						 
						
							2017-11-23 19:30:51 +05:30  
				
					
						
							
							
								 
						
							
								41fd9c66ef 
								
							 
						 
						
							
							
								
								Close the retention blocks before deleting them.  
							
							... 
							
							
							
							Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in> 
							
						 
						
							2017-11-23 18:57:10 +05:30  
				
					
						
							
							
								 
						
							
								1fc94a02d1 
								
							 
						 
						
							
							
								
								Don't retry failed compactions.  
							
							... 
							
							
							
							Fixes  prometheus/prometheus#3487 
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in> 
						
							2017-11-23 15:16:20 +05:30  
				
					
						
							
							
								 
						
							
								1627a47640 
								
							 
						 
						
							
							
								
								A copy is being assigned newChunk not the original  
							
							... 
							
							
							
							Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in> 
							
						 
						
							2017-11-22 17:58:06 +05:30  
				
					
						
							
							
								 
						
							
								e5ce2bef43 
								
							 
						 
						
							
							
								
								Add explicit error to Querier.Select  
							
							... 
							
							
							
							This has been a frequent source of debugging pain since errors are
potentially delayed to a much later point. They bubble up in an
unrelated execution path. 
							
						 
						
							2017-11-13 12:16:58 +01:00  
				
					
						
							
							
								 
						
							
								1dad3370fd 
								
							 
						 
						
							
							
								
								Close WAL when closing the DB  
							
							... 
							
							
							
							Also, the `wal` field of the `DB` was not used anywhere, so this removes
it. 
							
						 
						
							2017-11-11 14:56:23 +01:00  
				
					
						
							
							
								 
						
							
								fb9da52b11 
								
							 
						 
						
							
							
								
								Add more verbose error handling for closing, reduce locking  
							
							... 
							
							
							
							This commit introduces error returns in various places and is explicit
about closing persisted blocks.
{Index,Chunk,Tombstone}Readers are more consistent about their Close()
method. Whenever a reader is retrieved, the corresponding close method
must eventually be called. We use this to track pending readers against
persisted blocks.
Querier's against the DB no longer hold a read lock for their entire
lifecycle. This avoids long running queriers to starve new ones when we
have to acquire a write lock when reloading blocks. 
							
						 
						
							2017-10-10 12:13:37 +02:00  
				
					
						
							
							
								 
						
							
								c9fc2af6c0 
								
							 
						 
						
							
							
								
								Add test for snapshot  
							
							
							
						 
						
							2017-10-03 13:06:26 +01:00  
				
					
						
							
							
								 
						
							
								afaf12fe45 
								
							 
						 
						
							
							
								
								Compress the series chunk details in index.  
							
							... 
							
							
							
							Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in> 
							
						 
						
							2017-09-08 20:25:19 +05:30  
				
					
						
							
							
								 
						
							
								c36d574290 
								
							 
						 
						
							
							
								
								Replace single head lock with granular locks  
							
							... 
							
							
							
							This adds various new locks to replace the single big lock on
the head. All parts now must be COW as they may be held by clients
after initial retrieval.
Series by ID and hashes are now held in a stripe lock to reduce
contention and total holding time during GC. This should reduce
starvation of readers. 
							
						 
						
							2017-09-05 14:41:39 +02:00  
				
					
						
							
							
								 
						
							
								5cf2662074 
								
							 
						 
						
							
							
								
								Refactor WAL into Head and misc improvements  
							
							
							
						 
						
							2017-09-01 11:50:58 +02:00  
				
					
						
							
							
								 
						
							
								3901b6e70b 
								
							 
						 
						
							
							
								
								Remove multiple heads  
							
							... 
							
							
							
							This changes the structure to a single WAL backed by a single head
block.
Parts of the head block can be compacted. This relieves us from any head
amangement and greatly simplifies any consistency and isolation concerns
by just having a single head. 
							
						 
						
							2017-09-01 11:50:58 +02:00  
				
					
						
							
							
								 
						
							
								7438ed7035 
								
							 
						 
						
							
							
								
								Expose Intervals type for use by TombstoneReader.  
							
							... 
							
							
							
							TombstoneReader is exposed but Intervals is not.
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in> 
							
						 
						
							2017-08-25 16:06:36 +05:30  
				
					
						
							
							
								 
						
							
								3065be97d8 
								
							 
						 
						
							
							
								
								Fix and document locking order for DB  
							
							
							
						 
						
							2017-07-14 09:00:22 +02:00  
				
					
						
							
							
								 
						
							
								9bf7aa9af1 
								
							 
						 
						
							
							
								
								Misc. fixes incorporating feedback.  
							
							... 
							
							
							
							Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in> 
							
						 
						
							2017-05-23 18:13:30 +05:30  
				
					
						
							
							
								 
						
							
								39df7e2bba 
								
							 
						 
						
							
							
								
								Switch blocks to ULID directories, drop sequenc numbers  
							
							
							
						 
						
							2017-05-18 16:09:30 +02:00  
				
					
						
							
							
								 
						
							
								285bc07030 
								
							 
						 
						
							
							
								
								Switch append refs to string  
							
							
							
						 
						
							2017-05-18 10:56:57 +02:00  
				
					
						
							
							
								 
						
							
								54a7b98cff 
								
							 
						 
						
							
							
								
								Fix and test ref handling in DB appender  
							
							
							
						 
						
							2017-04-28 15:24:28 +02:00  
				
					
						
							
							
								 
						
							
								2742fc380b 
								
							 
						 
						
							
							
								
								Test we get back out the data we put in.  
							
							... 
							
							
							
							This also adds a utility that'll aid future tests. 
							
						 
						
							2017-04-21 14:10:14 +01:00  
				
					
						
							
							
								 
						
							
								dba222b53c 
								
							 
						 
						
							
							
								
								Make rollback actually rollback.  
							
							... 
							
							
							
							Also add tests for basic commit/rollback
functionality.
Fixes  #39  
							
						 
						
							2017-04-19 11:28:36 +01:00  
				
					
						
							
							
								 
						
							
								778103b450 
								
							 
						 
						
							
							
								
								Add liecence file and headers  
							
							
							
						 
						
							2017-04-10 20:59:45 +02:00  
				
					
						
							
							
								 
						
							
								eedbebe1d7 
								
							 
						 
						
							
							
								
								Misc cleanups  
							
							
							
						 
						
							2017-03-06 14:34:49 +01:00  
				
					
						
							
							
								 
						
							
								0a94f58f1a 
								
							 
						 
						
							
							
								
								Fix test import of labels, simplify constructor names  
							
							
							
						 
						
							2016-12-21 15:12:26 +01:00  
				
					
						
							
							
								 
						
							
								83574b1565 
								
							 
						 
						
							
							
								
								Add new interfaces and skeleton  
							
							
							
						 
						
							2016-12-04 13:16:11 +01:00  
				
					
						
							
							
								 
						
							
								6f93a699e6 
								
							 
						 
						
							
							
								
								wipe  
							
							
							
						 
						
							2016-12-02 17:49:05 +01:00  
				
					
						
							
							
								 
						
							
								f9f11c4a08 
								
							 
						 
						
							
							
								
								Add main db implementation  
							
							
							
						 
						
							2016-11-15 10:34:25 +01:00