Comments (8)
Thanks for reporting it. I'll try to reproduce this issue.
from fluency.
I had a look at the code:
- I would make the passed around ack token a String (in org.komamitsu.fluency.fluentd.ingester.sender.FluentdSender#sendInternal).
- In org.komamitsu.fluency.fluentd.ingester.sender.RequestOption I would change the type to String
- In org.komamitsu.fluency.fluentd.ingester.FluentdIngester#ingest I would change the chunk generation to
UUID uuid = UUID.randomUUID();
ByteBuffer uuidByteBuffer = ByteBuffer.wrap(new byte[16]);
uuidByteBuffer.putLong(uuid.getMostSignificantBits());
uuidByteBuffer.putLong(uuid.getLeastSignificantBits());
byte[] uuidBytes = uuidByteBuffer.array();
String uuidBase64Encoded = Base64.getEncoder().encodeToString(uuidBytes);
ByteBuffer optionBuffer = ByteBuffer.wrap(objectMapper.writeValueAsBytes(new RequestOption(dataLength, uuidBase64Encoded)));
List<ByteBuffer> buffers = Arrays.asList(headerBuffer, dataBuffer, optionBuffer);
synchronized (sender) {
sender.sendWithAck(buffers, uuidBase64Encoded);
}
- The String always holds the base64 encoded token. And when the ack token is received from fluentd, I would just compare the base64 encoded version (I would not convert it back to a UUID, only when required for the UnmatchedAckException exception.
I am happy to put up a PR with those changes if you agree that we got an issue and with my solution proposal ;)
from fluency.
@elruwen Your plan looks good! Thanks.
Let me add a comment on the plan.
This issue happens because fluent-bit expects ACK token called chunk
is MessagePack String not Binary at https://github.com/fluent/fluent-bit/blob/bb0c95b4d846dc90b9e4072f081c7fff9a2bdad6/plugins/in_forward/fw_prot.c#L162 and doesn't validate the value itself. So, I don't think Fluency needs to send Base64 format value for now.
Also strictly speaking, in fluent-bit the source of chunk
is a SHA-512 of the data sent to in_forward https://github.com/fluent/fluent-bit/blob/bb0c95b4d846dc90b9e4072f081c7fff9a2bdad6/plugins/out_forward/forward_format.c#L96. The 3rd change item you suggested is a bit incomplete and I think we can skip the change since sending Base64 format chunk
isn't required for now.
from fluency.
This issue is fixed by #182
from fluency.
This issue is fixed by #182
Thanks for merging it, can we get a release? :)
from fluency.
I'll release the fix in a few days.
from fluency.
Released this change as 2.5.1. It'll be visible in a few hours on Maven Central.
from fluency.
Awesome, thanks for the quick turn-around :)
from fluency.
Related Issues (20)
- Can we customize the size of data sent? HOT 3
- Exception when ack expected but not received HOT 3
- Some logs are lost after fluentd restart HOT 4
- emit map date issure HOT 2
- Not getting logs on AWS EKS cluster HOT 1
- Cannot use mutual signing TLS HOT 2
- Micrometer metrics HOT 2
- java.lang.NoClassDefFoundError: on Android 6 devices HOT 1
- Introduce strict buffer retention size property HOT 5
- Broken Pipe error after 1 minute of idle HOT 3
- Provide an additional way to configure the RecordFormatter when using the FluencyBuilderForFluentd HOT 4
- Connection reset by peer errors HOT 2
- Need a way to configure fileBackupPrefix of Buffer.Config HOT 3
- Fluency - emit() failed due to buffer full. Flushing buffer. Please try again. HOT 5
- Add support for Unix domain sockets HOT 3
- ackResponseMode true - SocketReadTimeout causes infinite retry HOT 1
- A full buffer should not log any errors HOT 3
- Data loss in the Buffer after throwing an IOException inside `moveRetentionBufferToFlushable()` method HOT 2
- `fluency-fluentd` should expose `fluency-core` via `api` in `build.gradle.kts`
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 fluency.