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

Simplify 'Trace' library to prevent it from data race issue #171

Merged
merged 4 commits into from
Jan 31, 2024

Conversation

MatsuoTakuro
Copy link
Collaborator

@MatsuoTakuro MatsuoTakuro commented Jan 30, 2024

  • simplify tracing
    • remove TraceableContext and related funcs
    • make it immutable by returning a new context to prevent it from data race
      • data race issue occurs between (*TraceableContext) Pop() as write and *TraceableContext.Done() as read that is triggered by go-sql-driver/mysql.(*mysqlConn).startWatcher such as in the case of a bad connection error.
  • provide option to enable tracing with operation name you like
    • for redis MasterCache and TenantCache

     - remove 'TraceableContext' and related funcs
     - make it immutable by returning a new context to prevent it from data race
@MatsuoTakuro MatsuoTakuro changed the title Simplify tracing Simplify Tracing tools Jan 30, 2024
@MatsuoTakuro MatsuoTakuro changed the title Simplify Tracing tools Simplify Tracing library Jan 30, 2024
@MatsuoTakuro MatsuoTakuro changed the title Simplify Tracing library Simplify 'Trace' library to prevent it from data race issue Jan 30, 2024
@MatsuoTakuro MatsuoTakuro marked this pull request as ready for review January 30, 2024 07:10
@tanvir-retailai tanvir-retailai merged commit 7e50cab into develop Jan 31, 2024
1 check passed
@tanvir-retailai tanvir-retailai deleted the feature/simplify-tracing branch January 31, 2024 04:51
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.

3 participants