Comments (1)
Hi @toni-moreno, @matejzero,
First of all ,thanks for the great implementation, it is very useful for us @toni-moreno.
This issue is stale for quite a while, but I wanted to leave an update since we have ran into the same issue.
The issue is most likely occurs due to a problem with the handleWriteSingle function.
https://github.com/toni-moreno/influxdb-srelay/blob/master/pkg/cluster/influxcluster.go#L168-L178
The function will be called in a loop from a parent function that loops through on all matching routes.
The issue is that:
https://github.com/toni-moreno/influxdb-srelay/blob/master/pkg/cluster/influxcluster.go#L178 will be called twice.
The getBuf() function is doing the following:
c.bufPool.Get().(*bytes.Buffer)
bufPool is:
bufPool sync.Pool
sync.Pool.Get() will result in this:
https://golang.org/pkg/sync/#Pool.Get
As you can see the issue lies here:
Get selects an arbitrary item from the Pool, removes it from the Pool, and returns it to the caller.
The first call will remove the data and the second call will only get an empty result.
The one big HACluster with multiple boxes is working, because it is using the handleWriteHA function, which takes the buffer the same way, but loops through on all endpoints with the same variable inside the same function.
https://github.com/toni-moreno/influxdb-srelay/blob/master/pkg/cluster/influxcluster.go#L221-L254
Could you take a look if I am right?
Many thanks,
Peter
from influxdb-srelay.
Related Issues (20)
- Error sometimes with http: multiple response.WriteHeader calls HOT 1
- Bad status shown in log on Single instance Clusters
- [BUG] Traceroute doesn't contains the backend name on Single Clusters Write Mode
- [Feature Request] Add Real Client IP when sourceIP is a proxy
- [Bug] queryRouterEndpointAPI not working, does not seem to be populated HOT 6
- access logs are piling up continuously HOT 2
- Random Agent Panic
- Http access log is hard-coded to debug. Configuration log-level is useless HOT 18
- How to write data points HOT 6
- Panic while trying to read from second influxdb node while first is down. HOT 5
- Flux query with influxdb-srelay? HOT 6
- Influxdb-srelay and influxdb-python library HOT 1
- Add DROP SERIES in admin endpoint HOT 3
- srelay not compatible with influxdb native interfaces
- [Doc] Example of simple setup - srelay with Prometheus remote config
- No support for v2 write api HOT 3
- Recovering from buffer results in missing and double data HOT 6
- it might be useful to announce the v2 api support more explicitly HOT 2
- help on build config to route on measurements
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 influxdb-srelay.