Hey all,
I've been troubleshooting an issue where expired tickets aren't getting cleaned up when using the GoogleCloudFirestoreTicketRegistry. After digging through the code, I think I found the reason why — and it seems like it might be a bug or at least an oversight.
In DefaultTicketRegistryCleaner, the cleaner does this:
So it’s expecting to stream all tickets, then filter the expired ones.
But in the Firestore implementation, the getTickets() method already filters out expired tickets before returning them:
That means ticketRegistry.stream() never includes expired tickets in the first place — so the cleaner never sees anything to delete. No logs, no cleanup, nothing.
Is that filtering supposed to be there? It seems like the registry should return everything and let the cleaner decide what to do with them. Otherwise, expired tickets just sit in Firestore forever.
Anyone else run into this? Am I missing something?