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

Tests fail with "leadership transfer failed" #177

Closed
gibmat opened this issue Jan 16, 2022 · 2 comments
Closed

Tests fail with "leadership transfer failed" #177

gibmat opened this issue Jan 16, 2022 · 2 comments

Comments

@gibmat
Copy link

gibmat commented Jan 16, 2022

Recently, two tests have begun failing when building this library on a Debian unstable system. What's puzzling is that the version of this library hasn't changed (1.10.2), which points to a change in one of its dependencies, yet I can't find an obvious culprit.

From my attempts to figure out why the tests are failing, it seems to be related to the version of the raft library (v0.9.25 works fine, with errors appearing when using v0.11.2) --but-- the tests had previously passed when the raft version in unstable was 0.11.2+git211119. I thought it might be related to newer versions of dqlite (hasn't changed in Debian unstable since mid-November) or sqlite3 (v3.37 was just recently uploaded, but tests fail with v3.36 as well).

I'm hoping someone else may have some idea about what's changed that is now causing the tests to fail.

Versions:

  • Debian unstable
  • golang v1.17.6
  • go-dqlite v1.10.2
  • dqlite v1.9.0+git211116
  • raft v0.11.2+git211214
  • sqlite3 v3.37.2
=== RUN   TestHandover_TwoNodes
    app_test.go:958: 22:17:01.858 - 36: DEBUG: new connection from 127.0.0.1:39042
    app_test.go:958: 22:17:01.885 - 36: DEBUG: attempt 0: server 127.0.0.1:9001: connected
    app_test.go:958: 22:17:01.888 - 36: DEBUG: new connection from 127.0.0.1:39044
    app_test.go:958: 22:17:01.024 - 36: DEBUG: new connection from 127.0.0.1:39046
    app_test.go:958: 22:17:01.041 - 37: DEBUG: attempt 0: server 127.0.0.1:9001: connected
    app_test.go:958: 22:17:01.053 - 36: DEBUG: new connection from 127.0.0.1:39050
    app_test.go:958: 22:17:01.053 - 37: DEBUG: new connection from 127.0.0.1:46340
    app_test.go:958: 22:17:01.077 - 36: DEBUG: new connection from 127.0.0.1:39052
    app_test.go:958: 22:17:01.102 - 36: DEBUG: attempt 0: server 127.0.0.1:9001: connected
    app_test.go:958: 22:17:01.102 - 37: DEBUG: new connection from 127.0.0.1:46346
    app_test.go:958: 22:17:01.102 - 36: DEBUG: new connection from 127.0.0.1:39056
    app_test.go:958: 22:17:01.128 - 37: DEBUG: new connection from 127.0.0.1:46350
    app_test.go:958: 22:17:01.153 - 36: DEBUG: new connection from 127.0.0.1:39060
    app_test.go:958: 22:17:01.783 - 36: DEBUG: promoted 127.0.0.1:9002 from spare to voter
    app_test.go:958: 22:17:01.783 - 37: DEBUG: new connection from 127.0.0.1:46354
    app_test.go:958: 22:17:01.783 - 36: DEBUG: new connection from 127.0.0.1:39064
    app_test.go:958: 22:17:01.822 - 36: WARN: transfer leadership to 127.0.0.1:9002: leadership transfer failed (1)
    app_test.go:318: 
        	Error Trace:	app_test.go:318
        	Error:      	Received unexpected error:
        	            	transfer leadership: leadership transfer failed (1)
        	Test:       	TestHandover_TwoNodes
--- FAIL: TestHandover_TwoNodes (1.16s)

=== RUN   TestClient_Transfer
    client_test.go:117: 
        	Error Trace:	client_test.go:117
        	Error:      	Received unexpected error:
        	            	leadership transfer failed (1)
        	Test:       	TestClient_Transfer
--- FAIL: TestClient_Transfer (1.16s)
@MathieuBordere
Copy link
Contributor

raft 0.11.2 and dqlite 1.9.0 are slightly old, can you try with the new raft 0.11.3 and dqlite 1.9.1?

@gibmat
Copy link
Author

gibmat commented Feb 6, 2022

Sorry for the delay in replying -- today I did try building with the current versions of raft and dqlite, and now tests are passing again. I don't know exactly what the issue was, but since things are working again I'll close this issue. Sorry about the noise!

@gibmat gibmat closed this as completed Feb 6, 2022
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

No branches or pull requests

2 participants