Skip to content

Make alist sort by checkpoint ID DESC #106

@strentom

Description

@strentom

Hello, my usecase is that when my agent crashes (the app/the machine/... or the server restarts), I want to resume the crashed sessions. To find those sessions that didn't finish, after restart I could look into the checkpointer and use app-specific logic to find them.

This should be doable with SQLite checkpointer, because those results are sorted, as shown here. So going through those that failed is easy as they will be at the top and I can quickly end the search. The assumption is that timestamp~checkpoint ID.

This seems impossible with Redis, because the checkpoints are not sorted. I went through the code and don't see any hints that they would be sorted (or sortable). Consequently, I'd have to search through all checkpoints which is unacceptable.

I'm also surprised I seem to be first to notice: Is this an anti-pattern or technically impossible?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions