Commit Graph

657 Commits (1ce8d6290bd656840eccab01c39359e4b87f7654)

Author SHA1 Message Date
Jason Wilder 1ce8d6290b Remove values pool replacement
Getting an intermittent test failure with this so removing it for now since compactions
are still able to keep up without it.  Will need to look into this further because the
allocations is still very high and will affect compactions over longer periods of time.
2015-11-24 13:40:07 -07:00
Jason Wilder 0832a03333 Move pools to separate file 2015-11-24 09:44:37 -07:00
Jason Wilder a6541937f8 Add dumptsmdev to influx_inspect
Allow inspecting the updated TSM format.
2015-11-24 08:50:13 -07:00
Jason Wilder 25206c729c Add compactor type 2015-11-24 08:50:07 -07:00
Jason Wilder f70323cb89 Add MergeIterator
MergeIterator will be used to merge multiple TSM KeyIterators and the
WAL KeyIterator using a stream based iteration approach.  Each iteration
cycle returns a key and values ordered in way to write a new TSM file
optimally.
2015-11-23 14:59:15 -07:00
Jason Wilder 5334271e26 Add KeyIterator for WAL segments
This provides and interface and type to combine multiple WAL segments
in order and then allow the values to be read in an order suitable for
writing to a TSM file.
2015-11-23 14:59:15 -07:00
Jason Wilder d2b045f89b Code cleanup 2015-11-23 14:03:50 -07:00
Jason Wilder 697cfe604b Add stubbed out dev tsm engine
Starting to integrate some of the components into a engine that is
usable for development purposes.  This allows the code to evolve while
keeping the existing TSM engine in tact for reference.

Currently, just the WAL is wired up so writes can be tested.  Other engine
functions will panic the server if called.
2015-11-23 13:55:34 -07:00
Jason Wilder 7461b61bf2 Fix race in WAL and WALSegmentWriter
WAL currentSegmentWriter was not accessed under a mutex.  The WALSegmentWriter
also did not use a mutex to protect the underlying writer.
2015-11-23 13:55:34 -07:00
Jason Wilder aa00ef953a Fix typo in func names 2015-11-23 13:55:34 -07:00
Jason Wilder e2b1a09ece Implemment WAL write/delete functions 2015-11-23 13:55:33 -07:00
Jason Wilder afc0d5bfb9 Add WALSegmentReader/Writer
Basic types for reading and writing WAL segment files.
2015-11-23 13:55:33 -07:00
Jason Wilder 151b33d000 Rename wal.go to log.go
This is the existing WAL + cache implementation.  Moving it to a separate file
so that it can remain intact while a refactoring to a independent WAL can occur.

The WAL was also named Log in the code so this names file more closely to the concept
in the code.
2015-11-23 13:53:30 -07:00
Philip O'Toole 1a77c76245 Merge pull request #4863 from influxdb/simple_wal_cache
Move to simpler cache
2015-11-23 12:49:58 -08:00
Philip O'Toole 19f53d8a75 Add some simple benchmarks 2015-11-20 21:09:44 -08:00
Philip O'Toole 5b573b9248 Move to simpler cache
This cache simply evicts as much as possible whenever a checkpoint is
set.
2015-11-20 21:09:24 -08:00
mengjinglei 9b6cdb4622 fix Top&Bottom function 2015-11-21 09:36:55 +08:00
mengjingleli c94077e23a fix min&max 2015-11-21 09:29:17 +08:00
Jason Wilder 0d1508a7c6 Add comments for search 2015-11-17 23:24:10 -07:00
Jason Wilder a7d7c280ed Add block type to index
This will faciliate loading a block into a type specific result without
first loading the block.  This will also allow us to populate the database
index solely from the index.
2015-11-17 23:24:09 -07:00
Jason Wilder e5022a898d Support decoding into type specific slices
There is a lot of allocations performed when decoding blocks.  These
types can be re-used to reduce allocations in many cases.  This change
allows a type specific slice to be passed in to decode funcs to be re-used
if it is large enough.

The existing decode is is left for backwards compatibility but is not
very efficient right now.  It may be removed.
2015-11-17 23:24:09 -07:00
Jason Wilder 5a12c49475 Make type specific decoders exported 2015-11-17 23:24:09 -07:00
Jason Wilder d517bad6f2 Add BlockType func
Allows the block type to be determined without decoding all the values.
2015-11-17 23:24:09 -07:00
Philip O'Toole 6aede8f562 Clone should sort values
This code may actually change soon due to internal design changes, but
this will ensure testing output is constant.
2015-11-17 11:59:50 -08:00
Philip O'Toole 76b02c9143 Merge pull request #4812 from influxdb/checkpointed_wal_tsm_cache
Checkpointed WAL tsm1 cache
2015-11-17 11:27:00 -08:00
Jason Wilder bd0a89bb00 Merge pull request #4808 from influxdb/jw-tsm
Add FileStore for TSM files
2015-11-17 12:11:26 -07:00
Jason Wilder 7c7a68d783 Small cleanups 2015-11-17 11:30:29 -07:00
Cory LaNou c12881ff10 Merge pull request #4822 from influxdb/fix-4193
Fix time inclusive comparison
2015-11-17 10:50:51 -06:00
Cory LaNou 6309ec9a68 fix time inclusive comparison 2015-11-17 10:43:27 -06:00
Philip O'Toole b46e10e40c Merge pull request #4818 from CrazyJvm/cluster-panic
check point without fields when NewPoint
2015-11-17 08:29:18 -08:00
Cory LaNou c24c2f720a refactor newPointHeap 2015-11-17 09:17:35 -06:00
CrazyJvm 6e60e3226a check point without fields when NewPoint 2015-11-17 13:21:52 +08:00
Philip O'Toole d8ea132c53 Add WAL cache 2015-11-16 19:52:49 -08:00
Cory LaNou 824d7a1d9b Add interface for heap to support Reverse for `order by desc` 2015-11-16 15:10:55 -06:00
Jason Wilder 9c2be12b65 Add FileStore.Remove func
Allows a TSMFile to be removed from the active set of files managed
by the FileStore.
2015-11-16 09:16:10 -07:00
Jason Wilder c2530e93d7 Add mutexes around seeker usage
These are not goroutine safe.
2015-11-16 09:05:27 -07:00
Jason Wilder ef18f8afb2 Handle TSM key deletions
This writes a tombstone file containing a line per deleted key. This
file is read when a TSMReader is created and any keys listed in the file
are removed from the index.
2015-11-16 08:44:52 -07:00
Jason Wilder ed7cfb6df3 Add Keys function to TSMIndex
Useful for testing
2015-11-16 08:44:52 -07:00
Jason Wilder d8c0c26934 Return error if number of blocks would overflow 2015-11-16 08:44:52 -07:00
Jason Wilder 16c5e0a2e0 Add Close to TSMWriter interface 2015-11-16 08:44:52 -07:00
Jason Wilder b279534f2a Remove type specific casts in encoders
This prevented the encoders from using other implementations of the Value
interface because it would always cast one of the types to our specific
implementations.
2015-11-16 08:44:52 -07:00
Jason Wilder 0ab423c7ff Initial FileStore implementation
Provides functionality to load a directory of TSM files (or add them manually)
as well as reading blocks of values for individual key and times.
2015-11-16 08:44:52 -07:00
Philip O'Toole 912684b8d6 WHERE fields must be decoded during aggregates
This change ensures that if there are any fields in the WHERE clause of
an aggregate that are different from the fields in the SELECT clause,
that the cursors also decode those fields. Otherwise WHERE clauses of
the form 'SELECT f(w) FROM x WHERE y=z' will return incorrect results

Fixes issue #4701.
2015-11-13 15:18:54 -08:00
Philip O'Toole f889ac1140 If no points to count, count is 0
Fix issue #4701.
2015-11-12 18:52:58 -08:00
Jason Wilder f56f3ae1e0 Merge pull request #4756 from influxdb/jw-tsm
TSM file reader/writers
2015-11-12 11:07:02 -07:00
Jason Wilder e4312d854c Fix typo 2015-11-12 09:53:38 -07:00
Jason Wilder 8e14877e98 Add diagrams/documentation about indirect indexing strategy 2015-11-11 17:01:20 -07:00
Jason Wilder 7df1c2dd31 Add an indirectIndex implementation
Implements the indirect indexing approach to allow indexes on MMAPed files
that may be larger than available RAM
2015-11-11 15:16:11 -07:00
Ross McDonald 2c687abf91 Removing reference to strings.Compare for downgrade from Go 1.5 to Go 1.4. 2015-11-11 14:40:34 -06:00
Jason Wilder 06016882ab Add revised TSM file writer/readers
This adds some basic file reader/writers for creating the updated TSM file format.  It uses a simple
in-memory index without MMAP for now, but will be extended to use and indirect indexing approach as well as MMAPed file access as described in the design doc.

This code is not integrated into the TSM engine yet
2015-11-11 12:52:34 -07:00