Comments (7)
In data_iterator_test.go, SetupTest adds a batch listener on the DataIterator that appends items in a map of lists (this.receivedRows
). This can cause panics due to concurrent map write. See this example: https://travis-ci.com/Shopify/ghostferry/builds/116171401
To fix this, either add a mutex or use a SyncMap.
from ghostferry.
In binlog_streamer.go, the logic maintaining the binlog streamer main loop states: s.lastStreamedBinlogPosition.Compare(s.targetBinlogPosition) < 0
. In tests, the binlog is not advanced very often. There's a chance that this comparison will stay at 0, causing the BinlogStreamer to never quit in the tests.
We should be able to change this condition to <= 0. Before we do so, we need to check if this won't cause corruption.
from ghostferry.
TestThrottlerMultipleServerIDs could be racy as it checks if the lag throttler throttles by setting a lag in the database and sleeping for 10ms.
from ghostferry.
From #6:
In ghostferry.tests.TestIgnoresTables
:
--- FAIL: TestIgnoresTables (1.70s)
Error Trace: iterative_verifier_integration_test.go:139
integration_test_case.go:158
integration_test_case.go:105
integration_test_case.go:42
integration_test_case.go:33
iterative_verifier_integration_test.go:153
Error: Should be true
Some deadlocking issues:
ERRO[0006] failed to write events to target, 1 of 5 max retries error="exec query (445 bytes): Error 1213: Deadlock found when trying to get lock; try restarting transaction" tag=binlog_writer
ERRO[0006] failed to write events to target, 2 of 5 max retries error="exec query (445 bytes): Error 1213: Deadlock found when trying to get lock; try restarting transaction" tag=binlog_writer
ERRO[0006] failed to write events to target, 3 of 5 max retries error="exec query (445 bytes): Error 1213: Deadlock found when trying to get lock; try restarting transaction" tag=binlog_writer
ERRO[0006] failed to write events to target, 4 of 5 max retries error="exec query (445 bytes): Error 1213: Deadlock found when trying to get lock; try restarting transaction" tag=binlog_writer
ERRO[0006] failed to write events to target after 5 attempts, retry limit exceeded error="exec query (445 bytes): Error 1213: Deadlock found when trying to get lock; try restarting transaction" tag=binlog_writer
ERRO[0006] fatal error detected, state dump coming in stdout errfrom=binlog_writer error="exec query (445 bytes): Error 1213: Deadlock found when trying to get lock; try restarting transaction" tag=error_handler
{
"CompletedTables": {},
"LastSuccessfulBinlogPos": {
"Name": "mysql-bin.000003",
"Pos": 852531
},
"LastSuccessfulPrimaryKeys": {
"gftest.table1": 459
}
}
panic: fatal error detected, see logs for details
goroutine 1624 [running]:
github.com/Shopify/ghostferry.(*PanicErrorHandler).Fatal(0xc422171090, 0x8d27a3, 0xd, 0xb502a0, 0xc422fa6140)
/home/ubuntu/.go_project/src/github.com/Shopify/ghostferry/error_handler.go:44 +0x70a
github.com/Shopify/ghostferry.(*BinlogWriter).Run(0xc420220af0)
/home/ubuntu/.go_project/src/github.com/Shopify/ghostferry/binlog_writer.go:60 +0x37d
github.com/Shopify/ghostferry.(*Ferry).Run.func4(0xc422e91ba0, 0xc420492b40)
/home/ubuntu/.go_project/src/github.com/Shopify/ghostferry/ferry.go:288 +0x55
created by github.com/Shopify/ghostferry.(*Ferry).Run
/home/ubuntu/.go_project/src/github.com/Shopify/ghostferry/ferry.go:286 +0x249
exit status 2
FAIL github.com/Shopify/ghostferry/test 6.349s
from ghostferry.
=== FAIL: sharding/test TestSelectiveCopyDataWithInsertLoadOnAllTenants (1.21s)
TestSelectiveCopyDataWithInsertLoadOnAllTenants: trivial_integration_test.go:109:
Error Trace: trivial_integration_test.go:109
Error: Should be true
Test: TestSelectiveCopyDataWithInsertLoadOnAllTenants
from ghostferry.
test_interrupt_resume_inline_verifier_with_datawriter FAIL (1.06s)
Expected nil to not be nil.
/home/runner/work/ghostferry/ghostferry/test/integration/interrupt_resume_test.rb:149:in `test_interrupt_resume_inline_verifier_with_datawriter'
test/main.rb:34:in `<main>'
from ghostferry.
test_resume_from_failure_with_state_callback ERROR (1.08s)
Minitest::UnexpectedError: RuntimeError: Ghostferry did not fail
/home/runner/work/ghostferry/ghostferry/test/helpers/ghostferry_helper.rb:132:in `run_expecting_failure'
/home/runner/work/ghostferry/ghostferry/test/integration/interrupt_resume_test.rb:530:in `test_resume_from_failure_with_state_callback'
from ghostferry.
Related Issues (20)
- Problems with migrating data with foreign key constraints.
- Ghostferry documentations review 2021
- tried to advance to a zero log position HOT 1
- mediumint not recognized as numeric type HOT 2
- MariaDB SHOW SLAVE HOSTS output differs from MySQL
- MariaDB binlog events differ from MySQL
- unsigned mediumint value through binlog streamer wrongfully parsed HOT 2
- Cannot follow tutorial due to incompatible docker-compose.yml HOT 1
- Ghostferry misses data for PK values of <= 0 HOT 4
- Investigate removing the cursor and merge it back with the DataIterator
- BinlogStreamerLag in ControlServer's progress API is not seconds as it says it is HOT 1
- Ghostferry control server's webui shows the time taken as now - start
- TestThrottlerThrottlesAndUnthrottles flaky
- Ghostferry should abort if it sees a DDL command that can compromise data integrity
- Ensure BinlogEventBuffer Channel is initialized before running the BinlogStreamer
- Ghostferry binlog streamer lag with large source write volume due to misconfigured BinlogEventBatchSize? HOT 1
- Alternate exit criteria for DataIterators
- InlineVerifyer: invalid memory address or nil pointer dereference
- Trouble with virtual generated columns HOT 6
- Potentially "overlocking" in cursor?
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 ghostferry.