DBZ-7461 Fix getOffsetScn for XStreamAdapter
This commit is contained in:
parent
e174eae235
commit
ff1f38ae0b
@ -334,6 +334,7 @@ else if (getScnIndex() != null) {
|
||||
}
|
||||
|
||||
sb.append(", commit_scn=").append(sourceInfo.getCommitScn().toLoggableFormat());
|
||||
sb.append(", lcr_position=").append(sourceInfo.getLcrPosition());
|
||||
|
||||
sb.append("]");
|
||||
|
||||
|
@ -155,16 +155,16 @@ public Scn getOffsetScn(OracleOffsetContext offsetContext) {
|
||||
String lcrPosition = offsetContext.getLcrPosition();
|
||||
if (lcrPosition != null) {
|
||||
startPosition = LcrPosition.valueOf(lcrPosition).getRawPosition();
|
||||
getScn(startPosition);
|
||||
return getScn(startPosition);
|
||||
}
|
||||
return offsetContext.getScn();
|
||||
}
|
||||
|
||||
private static void getScn(byte[] startPosition) {
|
||||
private static Scn getScn(byte[] startPosition) {
|
||||
try {
|
||||
XStreamUtility.getSCNFromPosition(startPosition);
|
||||
return new Scn(XStreamUtility.getSCNFromPosition(startPosition).bigIntegerValue());
|
||||
}
|
||||
catch (StreamsException e) {
|
||||
catch (StreamsException | SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user