Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Messages not dropping from the MashChat db #16

Open
N5MXI opened this issue Nov 9, 2023 · 4 comments
Open

[Bug]: Messages not dropping from the MashChat db #16

N5MXI opened this issue Nov 9, 2023 · 4 comments
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@N5MXI
Copy link

N5MXI commented Nov 9, 2023

Contact Details

[email protected]

Version

v1.x

System Type

Linux

What happened?

AREDN v.3.23.8.0
API on Mikrotik node: mesh-api_2.9_all.ipk
MeshChat on R pi: meshchat-api_1.02_all.ipk

Issue: Messages dated in the future are not purged from the list. This causes new messages to appear lower in the list are are sometimes difficult to find.

messages.MeshChat.txt

What browsers are you seeing the problem on?

Chrome

@N5MXI N5MXI added bug Something isn't working needs triage labels Nov 9, 2023
@N5MXI
Copy link
Author

N5MXI commented Nov 9, 2023

Additional info: Zone=MeshChat The reported issue can be found on several nodes in this zone.

@hickey
Copy link
Owner

hickey commented Nov 9, 2023

Thank you @N5MXI for the bug report.

I have pulled out the offending message entries for further analysis.

553f3269	1699531616	date +'%s'\nCall me at \nHH 4847\nHams/IP 100217 (don't know if this is working?)\nN2MH MeshPhone 937-1000\n.	NC8Q-0	n5mxi-pi	pi	
6b0eedab	1699534817	Old Messages deleted	N5MXI	n5mxi-pi	pi	
77112a8c	14557688943	Hello World from API	N2MH	mailtest	pi	NWR Alert
1997613708	14557688943	Hello World from API	N2MH	mailtest	pi
109913913096	14557688943	Hello World from API	N2MH	mailtest	pi
18249644322966	14557688943	Hello World from API	N2MH	mailtest	pi
6795627248888166	14557688943	Hello World from API	N2MH	mailtest	pi
7463980200419164518	14557688943	Hello World from API	N2MH	mailtest	pi

The first two lines are valid, but the remaining lines are the ones that are not being removed from the DB.

Now that I see the entries I have a better understanding of what is going on with those entries. The timestamp that is there (14557688943) is a 34 bit number. The UNIX timestamp is only 32 bits long. I am willing to make a bet that the 2 most significant bits are being masked off some where and the resulting timestamp is 1672787055--although something else is amiss as that timestamp is earlier than all the rest of the timestamps in your DB. Because of the oversized timestamp, they will never be purged from the DB.

Since they were all created by N2MH, I will contact him to see if he has fixed his code or at least apprise him of the problem.

Unfortunately, the only way to get these messages out of the DB is to purged the messages from all MeshChat instance DBs. It is a bunch of work and may be easier to just wipe the DB on each instance.

@hickey
Copy link
Owner

hickey commented Nov 9, 2023

For reference, this is what @N5MXI was seeing on his MeshChat instance that produced this issue. Originally reported in https://www.arednmesh.org/content/purge-old-meshchat-messages

image

@hickey
Copy link
Owner

hickey commented Nov 9, 2023

@n2mh, I will be contacting you out of band on this issue.

@hickey hickey added the wontfix This will not be worked on label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants