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

GroupedSelection: Rows are refetched when cache is invalid [Closes #15] #59

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

hranicka
Copy link
Contributor

See #15

Currently we use something like this patch in projects and it seems fine.

GroupedSelection::execute refetches data only when isset($this->refCacheCurrent['data']) === TRUE but sometimes this cache is empty and $this->rows === NULL
-> I get errors described in #15

With this patch, it's OK.

I consider this code only as temporary fix. I don't know NDB too much.

@dg
Copy link
Member

dg commented Mar 26, 2015

Tests are failing…

@hranicka
Copy link
Contributor Author

I think that problem #15 is implementation of Selection::execute & GroupedSelection::execute which fails when cache is invalid.

But I still cannot find the reason why sometimes cache is not valid. Problem occurs SOMETIMES after deployment & cache clean-up & $this->rows === NULL. See #15.

I've made the simpliest change now in GroupedSelection::execute. But previous tests mocked insufficient cache and it made more database queries than expected before the change.

I can't write tests for invalid cache. When I fixed the problem, previous tests with storage mock failed.
It's more complex problem than I can resolve atm (my knowledges of internals of NDTB are poor).

@dg
Copy link
Member

dg commented Mar 26, 2015

My knowledge in poor too, I'll try to understand it, but it will not be soon…

@hranicka
Copy link
Contributor Author

Can someone with the same problem (#15) check this solution on real projects? Solves it bugs with cache?

@nechutny
@mishak87

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