Disable for UDP protocols commit clarification

Victor Butler10 months ago
Anton Tananaev10 months ago

Disables delayed response.

Victor Butler10 months ago

Thanks for the feedback, Anton! Can you clarify a bit more?

if (!connector.isDatagram() && !config.getBoolean(Keys.SERVER_INSTANT_ACKNOWLEDGEMENT)) {
   pipeline.addLast(new AcknowledgementHandler());
}

if SERVER_INSTANT_ACKNOWLEDGEMENT is false, UDP packets are filtered.

Is the added code: !connector.isDatagram() to ensure this is valid just for UDP packets?

Anton Tananaev10 months ago

Why would they be filtered?

Victor Butler10 months ago

without SERVER_INSTANT_ACKNOWLEDGEMENT = true in the config file, no data coming via UDP is recorded in the database.

So I wanted to know whether the !connector.isDatagram() is to restrict the setup only to UDP protocol or it's something else.

Anton Tananaev10 months ago

Logs?

Victor Butler10 months ago

The issue with the UDP packets was experienced back in August after upgrade to 5.8. Unfortunately, I don't have the logs that far back.

Still, after setting SERVER_INSTANT_ACKNOWLEDGEMENT = true in the config file (something you suggested back then), the server started recording the UDP data once again. No other changes, so it wasn't a device or server configuration issue.

Now I see another change, i.e. !connector.isDatagram() so ideally, I'd like to confirm what it does.

Anton Tananaev10 months ago

I already clarified what it does. It sounds like you're not interested in helping with investigating it, so I guess I don't think I can help any further here.

Victor Butler10 months ago

Well, I'd like to help but I don't have the logs 7 months back. I also provided all information I have - no changes to the device-server-traccar setup.
After upgrade to 5.8, boom no UDP records were processed. After setting the instant acknowledgement to true and restarting traccar, all was back to normal.

Also, all you said about the new code is 3 words: Disables delayed response, which doesn't really clarify much. Which response is disabled? The server? The device? What is considered delayed response? How is it determined that is delayed?
All questions without an answer.

UPDATE:

Here is the previous topic.
And the logs I provided back then:

Logs before the upgrade:

2023-08-12 00:00:00  INFO: [Ud8bb79a0: protocol < XXX.XXX.XXX.XXX] Incoming HEX
2023-08-12 00:00:00  INFO: [Ud8bb79a0: protocol > XXX.XXX.XXX.XXX] Server Response

Now I only have

2023-08-12 16:45:57  INFO: [U8300552d: protocol < XXX.XXX.XXX.XXX] Incoming HEX
2023-08-12 16:45:57  INFO: [U8300552d: protocol < YYY.YYY.YYY.YYY] Incoming HEX
2023-08-12 16:45:57  INFO: [U8300552d: protocol < ZZZ.ZZZ.ZZZ.ZZZ] Incoming HEX
Anton Tananaev10 months ago

Wait. Are you not using the latest version currently? I'm not sure I understand why we're talking about 5.8 here.

Victor Butler10 months ago

In version 5.8 (or 5.7 can't remember) the instant verification for UDP packets was introduced.
Without adding the instant verification in the config, it caused a major issue for UDP packets.

So now I see another change in the source code, precisely !connector.isDatagram() and I wonder whether there might be any adverse effects from it too.

Anton Tananaev10 months ago

I suspect it's the fix for the issue you are talking about.

Victor Butler10 months ago

It is possible, still it's unclear what it does so I cannot test if it's a fix or not.

Anton Tananaev10 months ago

I don't think I follow the logic. You should be able to test without knowing how it works.

Victor Butler10 months ago

I don't either - can you explain more clearly what it does or not?