Fabian Reinartz
b09d90c79c
Add decoding method to retrieve unsafe strings
...
When decoding data from mmaped blocks, we would like to retrieve
a string backed by the mmaped region. As the underlying byte slice
never changes, this is safe.
2017-09-08 18:41:43 +02:00
Fabian Reinartz
f904cd385f
Do not build a superflous 'all' postings
2017-09-08 18:41:43 +02:00
Fabian Reinartz
6892fc6dcb
Finish old WAL segment async, default to no fsync
...
We were still fsyncing while holding the write lock when we cut a new
segment. Given we cannot do anything but logging errors, we might just
as well complete segments asynchronously.
There's not realistic use case where one would fsync after every WAL
entry, thus make the default of a flush interval of 0 to never fsync
which is a much more likely use case.
2017-09-08 18:41:12 +02:00
Fabian Reinartz
d21f149745
*: migrate to go-kit/log
2017-09-08 22:01:51 +05:30
Goutham Veeramachaneni
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
Fabian Reinartz
9b4c3d4254
Merge pull request #3146 from prometheus/fixprofpath
...
web: fix profile paths
2017-09-08 14:19:46 +02:00
Fabian Reinartz
64c7c56df8
Merge pull request #3147 from dvrkps/patch-1
...
travis: add 1.x to go versions
2017-09-08 09:36:14 +02:00
Fabian Reinartz
1d5f85817d
Fix various races
2017-09-08 08:48:19 +02:00
Fabian Reinartz
c2916736be
Re-use slices on deocding the WAL. Fix tests.
2017-09-08 08:17:01 +02:00
Davor Kapsa
bb853abf24
travis: add 1.x to go versions
2017-09-07 17:24:02 +02:00
Fabian Reinartz
27bdddbf51
web: fix profile paths
2017-09-07 16:24:12 +02:00
Fabian Reinartz
5bed8af4cb
retrieval: pool scrape buffers
...
This adds a bucketed buffer pool to the scrapers so we don't have to
allocate a new buffer on each scrape or hold it fixed to the scrape
loop.
The latter can consume significant amounts of unused memory, e.g. 4GB
when scraping 2MB /metrics from 2000 targets.
2017-09-07 14:43:21 +02:00
Fabian Reinartz
d6f6ad67b3
pkg/pool: create bucketed memory pool package.
2017-09-07 14:34:05 +02:00
Fabian Reinartz
a8887f46dc
Merge branch 'dev-2.0' of github.com:prometheus/prometheus into dev-2.0
2017-09-07 14:15:12 +02:00
Fabian Reinartz
0efecea6d4
Adapt storage APIs to uint64 references
2017-09-07 14:14:41 +02:00
Fabian Reinartz
a007eb2e1e
vendor: update prometheus/tsdb to single head mode
2017-09-07 14:14:33 +02:00
Fabian Reinartz
6ab652e3dc
Merge pull request #3144 from wgliang/master
...
should use time.Since instead of time.Now().Sub
2017-09-07 13:51:46 +02:00
Fabian Reinartz
a0280cc489
Merge pull request #3142 from prometheus/fish/fix-k8s-ingress-type
...
k8s: Use versioned struct for ingress discovery
2017-09-07 13:51:20 +02:00
Fabian Reinartz
0db4c227b7
Fix min/max time handling and concurrent crc32 usage
2017-09-07 13:04:02 +02:00
wangguoliang
7e6c6020ff
should use time.Since instead of time.Now().Sub
...
Signed-off-by: wgliang <liangcszzu@163.com>
2017-09-07 18:00:45 +08:00
Fabian Reinartz
970bffec8d
Fix WAL errors and add tests for it
2017-09-07 10:58:34 +02:00
Fabian Reinartz
81222849bc
Filter WAL data in Head, misc fixes
2017-09-06 16:20:37 +02:00
Fabian Reinartz
33e9bdf403
WAL refactoring and truncation fixes and test
2017-09-06 14:59:25 +02:00
Johannes 'fish' Ziemke
75aec7d970
k8s: Use versioned struct for ingress discovery
2017-09-06 12:47:03 +02:00
Fabian Reinartz
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
Krasi Georgiev
153cb0cbe3
scraping errors will show in the log when debug mode is enabled ( #3135 )
...
Signed-off-by: Krasi Georgiev <krasi.root@gmail.com>
2017-09-05 11:55:14 +01:00
Fabian Reinartz
1ddedf2b30
Change series ID from uint32 to uint64
2017-09-04 16:08:38 +02:00
Fabian Reinartz
af2c2f9674
Re-enable head block delet test
2017-09-04 15:07:30 +02:00
Goutham Veeramachaneni
1698c516ad
[WIP]: WAL implementation
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-09-04 14:52:40 +02:00
Fabian Reinartz
87918f3097
Merge branch 'master' into dev-2.0
2017-09-04 14:09:21 +02:00
Fabian Reinartz
c70379e1c7
Merge branch 'dev-2.0' of github.com:prometheus/prometheus into dev-2.0
2017-09-04 13:10:50 +02:00
Johannes 'fish' Ziemke
70f3d1e9f9
k8s: Support discovery of ingresses ( #3111 )
...
* k8s: Support discovery of ingresses
* Move additional labels below allocation
This makes it more obvious why the additional elements are allocated.
Also fix allocation for node where we only set a single label.
* k8s: Remove port from ingress discovery
* k8s: Add comment to ingress discovery example
2017-09-04 13:10:44 +02:00
Fabian Reinartz
fffe51fb03
Add mutex and block profiling via envvar
2017-09-04 13:10:32 +02:00
Tobias Schmidt
29fff1eca4
Merge pull request #2966 from alkalinecoffee/consul-node-metadata
...
Add support for consul's node metadata
2017-09-02 18:43:25 +02:00
Fabian Reinartz
9f41d9fd3c
Instrument chunks on level 1 compactions
2017-09-01 16:10:10 +02:00
Fabian Reinartz
893b6ec506
Add tests for GC and chunk truncation
2017-09-01 14:38:49 +02:00
Fabian Reinartz
4f037da462
Remove defer statement in hot path
2017-09-01 12:09:29 +02:00
Fabian Reinartz
4cc37eecab
Refactor and add tests for compactor
2017-09-01 11:50:58 +02:00
Fabian Reinartz
5cf2662074
Refactor WAL into Head and misc improvements
2017-09-01 11:50:58 +02:00
Fabian Reinartz
8209e3ec23
Add various metrics
2017-09-01 11:50:58 +02:00
Fabian Reinartz
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
Fabian Reinartz
0fe67df9f2
Merge pull request #135 from alin-amana/fix_eval_blocking_on_fsync
...
Don't do blocking disk I/O under mutex blocking scrape and eval
2017-09-01 11:49:25 +02:00
Alin Sinpalean
8f7934d025
Take the fdatasync() syscall out from under mutex lock to (mostly) avoid scrape and eval from blocking on disk I/O.
2017-09-01 09:45:54 +02:00
Tobias Schmidt
d0a02703a2
Merge pull request #3105 from sak0/dev
...
discovery openstack: support discovery hypervisors, add rule option.
2017-08-31 14:08:16 +02:00
CuiHaozhi
b1c18bf29b
discovery openstack: support discovery hosts, add rule option.
...
Signed-off-by: CuiHaozhi <cuihz@wise2c.com>
2017-08-29 10:14:00 -04:00
Julius Volz
aa5cdcb11e
Remove extra space in log output
2017-08-29 15:24:00 +02:00
gdmello
35c952e344
Added logging for remote storage adapter ( #3106 )
...
* Added logging for remote storage adapter on startup and on any error condition during /read or /write.
* CR feedback.
2017-08-29 15:22:56 +02:00
Lynn Lin
1bf25dc1b2
fix issues reported by gofmt and spelling typo ( #3127 )
2017-08-29 09:00:11 +01:00
Ben Kochie
59aca4138b
Fix staticcheck issues.
2017-08-28 17:29:01 +02:00
Ben Kochie
0fcfe3209f
Add staticcheck to build.
2017-08-28 17:29:01 +02:00