Comments (4)
Yes, this should be fixed before the next alpha. A counter within the transaction and a signaling bit for clients to not store the ref beyond the transaction would be one approach.
That means that all clients that want to use AddFast
have to maintain two separate caches – for within the current transaction and one for beyond. As it is, after the transaction initially creating a series, the next transaction has to to a regular Add
for the same series regardless.
Given that Prometheus itself does not currently append multiple samples for the same series in a transaction, I wonder if it is worth it at this point.
Even easier would be to reserve the 0 or max ID for "not found" and just always return it if a series was newly created.
from tsdb.
How bad is it just to do the Add
every time?
from tsdb.
Every time as in never do the AddFast
? It's one of the major reason for saving CPU aside from series maintenance. Without it, about 80% of CPU cycles are spent on allocating/GCing byte slices and hashing them.
from tsdb.
This can be closed.
from tsdb.
Related Issues (20)
- Memory issues on short block sizes HOT 23
- Flaky test with the new live reader HOT 3
- TSDB CLI tool doesn't work on live Prometheus HOT 1
- Snapshots with head block are unsafe HOT 7
- Support selectors for LabelNames and LabelValues HOT 2
- double metric HOT 4
- selectOverlappingDirs bug that misses some directories HOT 1
- Why do Max and Minn have opposite definitions? HOT 1
- Improve renameFile function HOT 5
- Cleanup temp file if rename/replace failed HOT 1
- "unknown series references" after clean shutdown HOT 47
- Log storage filesystem type at startup HOT 4
- Investigate WAL compression HOT 1
- Prometheus restart very slowly when the size of data folder is huge HOT 18
- prometheus_tsdb_compactions_failed_total metric not incremented when compaction fails HOT 1
- Unstable: Not all data returned after write HOT 2
- How best to write blocks when bulk importing? HOT 6
- Cannot run more than one wal.LiveReader with metrics
- Proposal to compute actual size of files on filesystems with compression HOT 4
- docs outdated on Label offset Table? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tsdb.