Page 1 of 1

Entered note disappeared

Posted: Sun Dec 28, 2025 9:43 am
by tigerpranke
User :flag-pt: Castanhola contacted the support ( :arrow: ticket ), as something went wrong when entering a note:
Castanhola wrote: This request for support was initially submitted on 25 December 2025 at 22:18:47 with the ID 72797, but as I still had not received a response four days later, I decided to delete the original request and resubmit it with more information. In particular, I continue to request an explanation of what happened, if possible, but I ask you to not attempt to recover that note, as in the meantime I have entered it again in EBT with the ID 251806231 and because if you did, you would force me to manually correct the comments on all 180 notes I have recorded so far and all those I will record until you reply (because of the final part of the comments on my notes, where I always put the total number of notes I have entered and the total value of the notes I have entered in the EBT).

The original support request follows >>>>>>>>>>

Hi. Something strange happened to me today. I entered the following note on EBT at 2025-12-25 14:54:02 (Portuguese time) ---> Portugal;Coimbra;3000-389,5,mxxxxx*,MAxxxxxxxxxx*,Estado=Excelente; Vincada; Levantamento VTM na Agência Central de Coimbra da Caixa Geral de Depósitos em 2025-12-18; Tenho 505568 notas e 6783325€ no EBT. ---> At 2025-12-25 14:54:03 I received the confirmation from the EBT server that the note had been successfully registered, with the ID 251740409 ---> UrlFetchApp.fetch status code = 200. Server reply = {"note0":{"status":0,"serial":"Mxxxxxxxxxx*","denomination":"5","billId":251740409},"data":[]}. ---> But afterwards, I downloaded my csv file from EBT and I realised that this note did not appear. And when I try to view the note with that ID using the following command, EBT says that the note requested is not in the database ---> https://pt.eurobilltracker.com/notes/?id=251740409 ---> Can you explain what happened? Was the note deleted by mistake or for some other reason? Merry Christmas. Castanhola
* I changed the details of the note, original details in the support ticket.

This looks strange. Could you take a look, please?

Re: Entered note disappeared

Posted: Sun Dec 28, 2025 8:03 pm
by avij
Note ID 251740408 was entered at 2025-12-25 16:54:00 and note ID 251740410 was entered at 2025-12-25 16:54:03. Something bad must have happened at around that time.

Looking at the database log I see this:
25/Dec/2025:16:54:03 Error executing query
25/Dec/2025:16:54:03 Deadlock found when trying to get lock; try restarting transaction
25/Dec/2025:16:54:03 query: UPDATE totals SET bills=bills+?, hits=hits+?, value=value+?

When a note is entered, 10 database tables get updated (11 if there was a hit). These are wrapped in a database transaction so that if some table update fails, the entire note adding transaction fails to keep the database in a consistent state. Sometimes it may happen that two simultaneous transactions conflict and one of them has to be terminated.

I had a look at the web server log to see if something unusual was happening at around this time, but nothing particular caught my eyes. Profile views, note entering. One note entry correction was logged as completed on 16:54:08. It doesn't quite fit into the time window, but if it started at, say, 16:54:02 and took a bit longer to complete for some reason, it might interact with note entering.

EBT should not have returned an "OK" message if it couldn't actually enter the note into the database, and/or EBT should have retried the transaction internally. Apparently there's room for improvement in this regard.

Notes get entered all the time and despite that, these problems do not happen that often. Maybe around six times each month on average for 2025. I had noticed these errors earlier but I had thought the user was presented with an actual error message in these cases. Apparently this isn't the case.

Sorry for the trouble!

Re: Entered note disappeared

Posted: Mon Dec 29, 2025 1:56 am
by Castanhola
Thank you for the detailed report avij. And there's no need to be sorry, because for me the only trouble was that I failed to conquer one minute of the year, which I will have to conquer next year.

I only realised that the banknote had not been entered precisely because I was hunting minutes of the year. First I thought it was a problem with my script developed in Google Apps Script for time hunting. Then I realised that everything was fine with my script and that I had received the confirmation of the banknote entering from the EBT server. In any case, I am glad that this problem contributed to the improvement of EBT.

Thanks again.

Re: Entered note disappeared

Posted: Sun Jan 25, 2026 2:40 pm
by Rotes Gras
The same happened to me last night. I entered a note, which was a hit. It was immediately confirmed as a hit.

When I wanted to have a look, the hit was not indicated neither on the main hit page nor in my personal hit collection.

The note wasn't registered at all, so I had to do that again.

Now it is there.

Re: Entered note disappeared

Posted: Sun Jan 25, 2026 7:19 pm
by avij
I can confirm that this oddity happened. Maybe it'd help if the transaction was split into two -- first all the other updates, then updating the totals table separately if the first transaction was successful. I'll see if I can fix this.