Skip to content

concurrent-provider-map-writes#313

Merged
general-kroll-4-life merged 1 commit into
mainfrom
bugfix/concurrent-provider-map-writes
Oct 15, 2023
Merged

concurrent-provider-map-writes#313
general-kroll-4-life merged 1 commit into
mainfrom
bugfix/concurrent-provider-map-writes

Conversation

@general-kroll-4-life

@general-kroll-4-life general-kroll-4-life commented Oct 14, 2023

Copy link
Copy Markdown
Contributor

Description

  • Addressed discovered concurrent map write bug.
  • Discovered in async query testing for python client lib here.

Bug stack trace:

fatal error: concurrent map writes

goroutine 12 [running]:
github.com/stackql/stackql/internal/stackql/handler.(*standardHandlerContext).GetProvider(0xc00017b800, ***0xc0001a2bd8?, 0xc0001a2bf0?***)
	/Users/runner/work/stackql/stackql/internal/stackql/handler/handler.go:259 +0x346
github.com/stackql/stackql/internal/stackql/astanalysis/earlyanalysis.(*indirectExpandAstVisitor).Visit(0xc00051a000, ***0x10[18](https://github.com/stackql/pystackql/actions/runs/6515738332/job/17698514492#step:8:19)89d90?, 0xc000139540?***)
	/Users/runner/work/stackql/stackql/internal/stackql/astanalysis/earlyanalysis/ast_expand.go:776 +0x83f0
github.com/stackql/stackql-parser/go/vt/sqlparser.TableName.Accept(...)
	/Users/runner/go/pkg/mod/github.com/stackql/stackql-parser@v0.0.13-beta08/go/vt/sqlparser/external_visitor.go:98
github.com/stackql/stackql/internal/stackql/astanalysis/earlyanalysis.(*indirectExpandAstVisitor).Visit(0xc00051a000, ***0x10188aee8?, 0xc000138e00?***)
	/Users/runner/work/stackql/stackql/internal/stackql/astanalysis/earlyanalysis/ast_expand.go:717 +0x4e06
github.com/stackql/stackql-parser/go/vt/sqlparser.(*AliasedTableExpr).Accept(0xc00002b5c0?, ***0x1018886a0?, 0xc00051a000?***)
...

Type of change

  • Bug fix (non-breaking change to fix a bug).
  • Feature (non-breaking change to add functionality).
  • Breaking change.
  • Other (eg: documentation change). Please explain.

Issues referenced.

Closes #310

Evidence

Checklist:

  • A full round of testing has been completed, and there are no test failures as a result of these changes.
  • The changes are covered with functional and/or integration robot testing.
  • The changes work on all supported platforms.
  • Unit tests pass locally, as per the developer guide.
  • Robot tests pass locally, as per the developer guide.
  • Linter passes locally, as per the developer guide.

Variations

As of now, we do not have asynchronous and/or concurrency tests in our tests suited. This will be handled in #314

Tech Debt

As of now, we do not have asynchronous and/or concurrency tests in our tests suited. This will be handled in #314

Summary:

- Addressed discovered concurrent map write bug.
@general-kroll-4-life general-kroll-4-life merged commit fe9d427 into main Oct 15, 2023
@general-kroll-4-life general-kroll-4-life deleted the bugfix/concurrent-provider-map-writes branch October 15, 2023 00:48
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.

[BUGFIX]: Fix detected race conditions

1 participant