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

fix: reset state when begin scan #239

Merged
merged 6 commits into from
Feb 19, 2024
Merged

fix: reset state when begin scan #239

merged 6 commits into from
Feb 19, 2024

Conversation

burmecia
Copy link
Member

What kind of change does this PR introduce?

This PR is to add state reset code when begin a scan, this can partially fix #237.

What is the current behavior?

The foreign table scan execution plan will be cached when foreign table query is defined in a function, this will result in begin_scan() being called without calling new() function, which is supposed to re-initialise the FDW instance.

What is the new behavior?

Added some state reseting codes in begin_scan() for some FDWs, so that their inner state will be reset correctly.

Additional context

This PR can partially fix #237, so the continuous foreign table function call should be correct. But for permanent fix, we need to find out better way to manage and re-use FdwState.

@burmecia
Copy link
Member Author

test failed due to this ClickHouse issue: ClickHouse/ClickHouse#60020

@burmecia burmecia requested a review from imor February 16, 2024 07:14
@burmecia burmecia merged commit ee74f6e into main Feb 19, 2024
2 checks passed
@burmecia burmecia deleted the fix/scan-state-reset branch February 19, 2024 06:28
kamyshdm pushed a commit to dymium-io/supabase-wrappers that referenced this pull request Jun 17, 2024
kamyshdm pushed a commit to dymium-io/supabase-wrappers that referenced this pull request Jun 17, 2024
…s from 95239dd..5b5c262

5b5c262 Merge pull request supabase#233 from supabase/chore/use_create_async_runtime
ee74f6e Merge pull request supabase#239 from supabase/fix/scan-state-reset
42aa7e1 Merge branch 'fix/scan-state-reset' of github.com:supabase/wrappers into fix/scan-state-reset
8c2d58e fix: reset state when begin scan
5e398a3 Merge pull request supabase#241 from supabase/ci/clickhouse-init-db
6967050 format test code
72012b6 ci: remove clickhouse init db
cfe70d1 fix: reset state when begin scan
c169e7e chore(s3): revert use  create_async_runtime()
0788612 chore(s3): use existing create_async_runtime()

git-subtree-dir: DbGuardian/foreign_data_wrappers/supabase_wrappers
git-subtree-split: 5b5c262
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.

Stripe FDW randomly returns no data
2 participants