Comments (3)
Hi @wiebeytec,
Can you please provide a test case demonstrating this with the local examples? It should be relatively easy to do given the same basic process you showed here. It's hard to follow what you're seeing as you are mixing various things together here as your first output is for vt_0000000300
and the next for vic-eu-central-1-fakelive-0000000401
.
I have been able to repeat one thing that you showed:
{"EventStreamRunning":"No","EventApplierRunning":"No","LastError":""} | 0
That's because when replication is not running the lag is unknown. MySQL represents that with NULL
for Seconds_Behind_Source
. As an integer, that becomes the zeroval. I will change that handling to use a string instead so that we also display NULL
in this case. The test case for that is:
git checkout main && make build
pushd examples/local
./101_initial_cluster.sh
../common/scripts/vtorc-down.sh
command mysql -u root --socket=${VTDATAROOT}/vt_0000000102/mysql.sock --binary-as-hex=false -e "stop slave"
mysql < ../common/insert_commerce_data.sql
sleep 5
mysql -e "show vitess_replication_status"
The results::
+----------+-------+------------+------------------+-----------+-------------------+-------------------------------------------------------------------------+----------------+-----------------------------------------+
| Keyspace | Shard | TabletType | Alias | Hostname | ReplicationSource | ReplicationHealth | ReplicationLag | ThrottlerStatus |
+----------+-------+------------+------------------+-----------+-------------------+-------------------------------------------------------------------------+----------------+-----------------------------------------+
| commerce | 0 | REPLICA | zone1-0000000100 | localhost | localhost:17101 | {"EventStreamRunning":"Yes","EventApplierRunning":"Yes","LastError":""} | 0 | {"state":"OK","load":0.00,"message":""} |
| commerce | 0 | RDONLY | zone1-0000000102 | localhost | localhost:17101 | {"EventStreamRunning":"No","EventApplierRunning":"No","LastError":""} | 0 | {"state":"OK","load":0.00,"message":""} |
+----------+-------+------------+------------------+-----------+-------------------+-------------------------------------------------------------------------+----------------+-----------------------------------------+
I'll try some more to repeat the behavior you're seeing but a test case would be very helpful. If I cannot repeat it then I will only fix what I was able to repeat.
Thank you!
from vitess.
Hi @wiebeytec ,
When implementing this show vitess_replication_status
command I used the tablet's replication lag stats variable (managed within the discover package's tablet healthcheck) instead of the seconds_behind_[master|source]
value from mysqld precisely because the stats variable will estimate the lag when replication is not running (this value is used to determine the lag and whether or not the tablet should be serving or not). I've confirmed that this stats variable is no longer working as expected, which we can also see in the tablet's HTTP status page output where it's also used:
❯ curl -s http://localhost:15102/debug/status | grep -A1 "Replication Lag"
<td>Replication Lag</td>
<td>0s</td>
I will investigate that underlying issue further and open a PR to fix it.
Thanks again!
from vitess.
My reference to vt_0000000300
was merely to explicitly use a config file name where the skip_slave_start
was located , but not specific to one managed mysql. It was to prevent saying something vague like 'the mysql config'. That could have been more clear; true.
Anyway, going by your last comment, all confusion seems cleared up 👍
from vitess.
Related Issues (20)
- Bug Report: too many rows fetched by multi-shard left join HOT 3
- Bug Report: Recent changes causing other queries to fail
- Bug Report: Vtadmin page does not show any data on first install in version 19 HOT 9
- Bug Report: query rewrite incorrectly moves HAVING clause to WHERE
- Bug Report: CTE query with a union and a complex expressions using literal doesn't work
- `schemadiff`: introduce "atomic diffs" concept.
- Feature Request: `PlannedReparentShard` should allow cross-cell takeover without requiring tablet alias
- Bug Report: VReplication based OnlineDDL gets stuck on subsequent migrations until --queryserver-config-schema-reload-time
- Enhancement: Restores should be possible for MySQL 8.0.35+ where version checks are relaxed
- Bug Report: `Illegal mix of collations for operation 'UNION' (errno 1271) (sqlstate HY000)` in health streamer HOT 9
- Invalid parsing of `WindowSpecification` leads to extra column in AST
- Feature Request: Get VTOrc to fix replication misconfiguration issues on replicas
- LFX community building HOT 4
- Feature Request: include information in VTGate LogStats that can indicate if a scatter is happening
- DESCRIBE fails for information_schema table/views
- Query returns "missing bind var __vtschemaname"
- Report the use of components with vulnerabilities in vitess HOT 2
- RFC: allow `vtgate` to filter tablets by tag K/Vs HOT 2
- RFC: support sampling rate for `querylog`
- Question: Incorrect Sonatype version reference HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vitess.