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

Why returning nagetive position when I set binlogPosition greater than 4? #21

Open
xhyzjiji opened this issue Mar 29, 2018 · 0 comments

Comments

@xhyzjiji
Copy link

xhyzjiji commented Mar 29, 2018

code: return first event by the specific position

OpenReplicator or = new OpenReplicator();
or.setHost(host);
or.setPort(port);
or.setUser(user);
or.setPassword(password);
or.setBinlogPosition(binlogStartPos); // greater than 4
or.setBinlogFileName(binlogFileName);
or.setBinlogEventListener(new BinlogEventListener() {
@OverRide
public void onEvents(BinlogEventV4 event) {
list.add(event);
// notify external thread to stop openReplicator
}
});
or.stop(xxx);
return list.get(0);

Then, I get binlog event like this:
event pos=-116 <--- first event
event timestamp=1517369647000
event pos=8808036 <--- second one is correct
event timestamp=1522235789000

@xhyzjiji xhyzjiji changed the title Why return nagetive position when I set binlogPosition greater than 4? Why returning nagetive position when I set binlogPosition greater than 4? Mar 29, 2018
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

1 participant