Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use normalized BinaryFen as evalCache id (lichess-org/lila#15020) #555

Merged
merged 6 commits into from
Apr 15, 2024

Conversation

niklasf
Copy link
Member

@niklasf niklasf commented Apr 14, 2024

@ornicar
Copy link
Collaborator

ornicar commented Apr 15, 2024

Looking great, but I saw something sub-optimal in mongodb when trying it out:

db.eval_cache2.find()
[
  {
    _id: {
      position: Binary.createFromBase64('//8AAAAA//8thErSAAAAABERERE+lVvj', 0)
    },
    // [...]
  }
]

I think it should be _id: Binary.createFromBase64(...). Using an object as the primary key can't be efficient :)

@ornicar
Copy link
Collaborator

ornicar commented Apr 15, 2024

I can take care of it in a few hours.

@niklasf
Copy link
Member Author

niklasf commented Apr 15, 2024

Oops. Glanced right over that. Fixed.

should solve the mongodb object _id
…al-cache-2

* 'eval-cache-2' of github.com:lichess-org/lila-ws:
  flatten EvalCacheEntry.Id bson handler
@ornicar
Copy link
Collaborator

ornicar commented Apr 15, 2024

I was also doing it, differently, but at the same time

@ornicar ornicar merged commit e8dfd33 into master Apr 15, 2024
2 checks passed
@niklasf niklasf deleted the eval-cache-2 branch April 15, 2024 10:59
@niklasf
Copy link
Member Author

niklasf commented Apr 15, 2024

That's better. I'll not touch lila, then.

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.

None yet

2 participants