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

feat: handle 'session not found' errors #39

Merged
merged 9 commits into from
May 19, 2022

Conversation

oprudkyi
Copy link
Contributor

fixes #37

There are a few cases when a 'Session not found' error can
happen:

  • Scripts that idle too long - for example, a Laravel queue worker
    or anything that doesn't call Spanner frequently enough (more than once an hour).
  • The session is more than 28 days old.
  • Some random flukes on Google's side.

@taka-oyama
Copy link
Collaborator

Hi thanks for the pull request! I have some review feedback. Please check it out.

src/Colopl/Spanner/Concerns/ManagesStaleReads.php Outdated Show resolved Hide resolved
src/Colopl/Spanner/Concerns/ManagesTransactions.php Outdated Show resolved Hide resolved
src/Colopl/Spanner/Connection.php Outdated Show resolved Hide resolved
src/Colopl/Spanner/Connection.php Outdated Show resolved Hide resolved
src/Colopl/Spanner/Connection.php Outdated Show resolved Hide resolved
src/Colopl/Spanner/Connection.php Outdated Show resolved Hide resolved
src/Colopl/Spanner/Connection.php Outdated Show resolved Hide resolved
@oprudkyi oprudkyi force-pushed the issue/handle_session_not_found-v4 branch from fd362e2 to 32bcff3 Compare May 17, 2022 06:32
src/Colopl/Spanner/Concerns/ManagesTransactions.php Outdated Show resolved Hide resolved
src/Colopl/Spanner/Concerns/ManagesTransactions.php Outdated Show resolved Hide resolved
src/Colopl/Spanner/Connection.php Outdated Show resolved Hide resolved
src/Colopl/Spanner/Concerns/ManagesTransactions.php Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/Colopl/Spanner/Connection.php Outdated Show resolved Hide resolved
tests/Colopl/Spanner/SessionNotFoundTest.php Outdated Show resolved Hide resolved
tests/Colopl/Spanner/SessionNotFoundTest.php Outdated Show resolved Hide resolved
tests/Colopl/Spanner/SessionNotFoundTest.php Outdated Show resolved Hide resolved
tests/Colopl/Spanner/SessionNotFoundTest.php Outdated Show resolved Hide resolved
tests/Colopl/Spanner/SessionNotFoundTest.php Outdated Show resolved Hide resolved
tests/Colopl/Spanner/SessionNotFoundTest.php Outdated Show resolved Hide resolved
src/Colopl/Spanner/Connection.php Outdated Show resolved Hide resolved
@taka-oyama taka-oyama merged commit a941c8a into colopl:master May 19, 2022
@taka-oyama
Copy link
Collaborator

Thank you for your contribution!

@taka-oyama
Copy link
Collaborator

I will release the next version once I fix the Phpstan errors.

@oprudkyi
Copy link
Contributor Author

Hi @taka-oyama

Thank you.
could you also please create branch v3 from https://github.com/colopl/laravel-spanner/tree/v3.9.3
so it will be possible to backport to older laravel ?

@taka-oyama
Copy link
Collaborator

Hi, thanks for the patience.

Yes, I will backport it.

I couldn't find time this week so I will do it on monday.

@oprudkyi
Copy link
Contributor Author

HI @taka-oyama
I thought to make a backport by self - the my whole endeavor was to get universal solution for Laravel 8.
But any solution will do.

@taka-oyama
Copy link
Collaborator

Hi. I released v4.1.0 and 3.10.0 (for laravel 8 or below), please check it out.

@taka-oyama
Copy link
Collaborator

Asking google to fix this upstream, so we don't have to do this hack.

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.

Session not found Exception
2 participants