vitessio / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
18.7k stars 2.1k forks source link

Track shard session affecting change inside the transaction #17266

Open harshit-gangal opened 1 day ago

harshit-gangal commented 1 day ago

Description

This PR adds tracking on per shard transaction on VTGate Session to know if DMLs caused any modification in the underlying database.

This will be used to restrict the participants of cross shard transactions ignoring non-modified shards from the list. As this is part of VTGate Session, it cannot be used in same release as it could potentially break VTGate upgrade

Related Issue(s)

Checklist

vitess-bot[bot] commented 1 day ago

Review Checklist

Hello reviewers! :wave: Please follow this checklist when reviewing this Pull Request.

General

Tests

Documentation

New flags

If a workflow is added or modified:

Backward compatibility

codecov[bot] commented 22 hours ago

Codecov Report

Attention: Patch coverage is 96.29630% with 4 lines in your changes missing coverage. Please review.

Project coverage is 67.41%. Comparing base (216fd70) to head (15ec122). Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
go/vt/vtgate/safe_session.go 95.45% 3 Missing :warning:
go/vt/vtgate/scatter_conn.go 97.61% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #17266 +/- ## ========================================== + Coverage 67.39% 67.41% +0.02% ========================================== Files 1570 1573 +3 Lines 252917 253132 +215 ========================================== + Hits 170446 170657 +211 - Misses 82471 82475 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: