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

Zio 1 update #1739

Merged
merged 4 commits into from
Feb 15, 2024
Merged

Zio 1 update #1739

merged 4 commits into from
Feb 15, 2024

Conversation

kanderson250
Copy link
Contributor

@kanderson250 kanderson250 commented Feb 13, 2024

Explicitly kill the tokens when the tracer around a ZIO transaction finishes. Do not increment a refcount.

Adds a unit test with back-to-back transactions.

@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (75bceb7) 70.81% compared to head (6281c1d) 70.76%.
Report is 54 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1739      +/-   ##
============================================
- Coverage     70.81%   70.76%   -0.05%     
+ Complexity    10097     9932     -165     
============================================
  Files           831      827       -4     
  Lines         40346    39850     -496     
  Branches       6131     6036      -95     
============================================
- Hits          28570    28199     -371     
+ Misses         9025     8925     -100     
+ Partials       2751     2726      -25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@obenkenobi obenkenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change

public static void clearThreadTokenAndRefCountAndTxn(AgentBridge.TokenAndRefCount tokenAndRefCount) {
    AgentBridge.activeToken.remove();
    if (tokenAndRefCount != null && tokenAndRefCount.refCount.decrementAndGet() == 0) {
      tokenAndRefCount.token.expire();
      tokenAndRefCount.token = null;
    }
  }

to be

public static void clearThreadTokenAndRefCountAndTxn(AgentBridge.TokenAndRefCount tokenAndRefCount) {
    AgentBridge.activeToken.remove();
    if (tokenAndRefCount != null) {
      tokenAndRefCount.token.expire();
      tokenAndRefCount.token = null;
    }
  }

@kanderson250 kanderson250 merged commit d49c2ca into main Feb 15, 2024
103 checks passed
@obenkenobi
Copy link
Contributor

Please refer to this issue for more details on the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants