summary
What would you like to see happen in this conversation?
I'd like to discuss a bug that caused a mysterious log breakdown.
What kind of "bug" is this "bug"?
The first few lines of the log were lost. Even the data stored on the server lost the beginning of the log.
What kind of "log" is that "log"?
Conversation Log. A list of what the user typed into the chat and what the bot responded to.
Is there anything else about that "log"?
In the first place, the server is supposed to send a single line of statements to the server, and the server side is supposed to do the postscript, so it's puzzling why it breaks off in the middle of the statement.
Conversation logs. A list of what the user typed into the chat and what the bot responded to.
on the server.
What kind of "server" is this "server"?
Receive a string on Heroku and return a reply response. The status is stored in Firestore.
What kind of "save" is that "save"?
The KVS is keyed to the talk ID, and the internal state necessary to continue the conversation is converted to JSON and stored there. JSON is the historical background, and when actually used, it is necessary to convert it into a form that can be entered into the Firestore before saving it.
What is it that you value?
I would like to see the bugs worked out. Losing logs is a loss, and I can't use it safely if I think it might be lost. I've tried a few quick and suspicious operations, but I can't reproduce them and I'm having a hard time keeping my head above water.
Where is that "log" located?
Firestore.
I would like to see the bug resolved. Losing logs is a loss, and I can't use it with confidence if I think it might be lost. I've tried a few quick and suspicious operations, but I can't reproduce them, and I'm having a hard time keeping my head above water.
Files to be appended. If the log disappears, you'd think it was overwritten, but it's inexplicable that it disappears because it should have been loaded, added, and written back in the first place.
Where do these "logs" come from?
Let's see, the feature that I think is suspicious this time is the "open and continue past conversations" feature that I recently added, and I was using it all the time when the logs actually disappeared. When I used this feature, I first accessed Firestore with the conversation ID in the browser's IndexedDB to retrieve the past logs and display them.
How do you know its "log"?
I'll send the conversation ID to Firestore and say, "Give me the log of this conversation."
What would you like to see happen with respect to that "log"?
I wish it would not disappear, or at least know how to reproduce the disappearing phenomenon. If you can't reproduce it, you can't debug it.
What needs to happen to the "log" for that to happen?
I don't know!
I'll send the conversation ID to Firestore and say, "Give me the log of this conversation."
Just a KVS on a server
Is there anything else you can tell us about that "server"?
I have a script that downloads the values on the server locally to make it easier to investigate, and I did see that the beginning of the log in question was broken using that, but then a few other things were downloaded. I should also see what kind of data those are.
How do you know its "server"?
That's the best way to know what the servers are up to.
Where is this "server" located?
I'm going to go observe a local copy.
That's the best way to know what's going on with the servers.
This page is auto-translated from /nishio/謎のログが途切れるバグが起きたので相談したい using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.