Skip to content

Conversation

sgtsquiggs
Copy link

@sgtsquiggs sgtsquiggs commented Jun 11, 2025

This PR will make the reids:",ver" tag optional. This PR will resolve #854.

Usecase:

You are using rueidis/om to keep a cache up-to-date, reading directly off a kafka queue. You do not want to deal with versioning your data in redis. You are always upserting.

TODO:

  • Update README and documentation

Comment on lines +74 to +75
s.ver = &field{reflect.TypeOf(int64(0)), "", -1, false, true, false}
s.verless = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it is possible to just keep s.ver == nil?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely can do that, just would result in more LOC changed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgtsquiggs, maybe we should keep the current approach. Is this PR ready for merge?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sgtsquiggs, could you help resolve the conflicts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let us disable optimistic locking in github.com/redis/rueidis/om
2 participants