Skip to content

integration/psync2 fails, detecting too many full syncs #7205

@oranagra

Description

@oranagra

@antirez this test still periodically fails, even after all the recent improvements.

[err]: PSYNC2: total sum of full synchronizations is exactly 4 in tests/integration/psync2.tcl
Expected 5 == 4 (context: type eval line 18 cmd {assert {$sum == 4}} proc ::test)

i tracked down the scenario, but i'm not entirely sure what's the right solution.

the flow is this:
master disconnects the replica
the replica doesn't cache it's master
when the replica attempts to connect to the next master it asks for a full sync.

on the replica it looks like this:

	readQueryFromClient
        serverLog(LL_VERBOSE, "Client closed connection");
        freeClientAsync(c);
		    c->flags |= CLIENT_CLOSE_ASAP;
		freeClient
			serverLog(LL_WARNING,"Connection with master lost.");
			not doing replicationCacheMaster since CLIENT_CLOSE_ASAP is set
	no cached master, requesting full sync from new master

could it be it's just about removing that condition from freeClient? i wasn't able to track it's origin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions