Skip to content

Commit

Permalink
SEBSERV-474 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anhefti committed Oct 30, 2023
1 parent 48c6214 commit 775f98d
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,14 @@ public Result<ClientConnection> save(final ClientConnection data) {
@Transactional
public Result<Boolean> saveSecurityCheckStatus(final Long connectionId, final Boolean checkStatus) {
return Result.tryCatch(() -> {

// NOTE: we use nanoseconds here to get a better precision to better avoid
// same value of real concurrent calls on distributed systems
final long nanosecondsNow = System.nanoTime();
this.clientConnectionRecordMapper.updateByPrimaryKeySelective(new ClientConnectionRecord(
connectionId,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, nanosecondsNow, null, null, null, null,
null,
Utils.toByte(checkStatus),
null, null));
return checkStatus;
Expand All @@ -450,9 +455,13 @@ public Result<Boolean> saveSecurityCheckStatus(final Long connectionId, final Bo
@Transactional
public Result<Boolean> saveSEBClientVersionCheckStatus(final Long connectionId, final Boolean checkStatus) {
return Result.tryCatch(() -> {
// NOTE: we use nanoseconds here to get a better precision to better avoid
// same value of real concurrent calls on distributed systems
final long nanosecondsNow = System.nanoTime();
this.clientConnectionRecordMapper.updateByPrimaryKeySelective(new ClientConnectionRecord(
connectionId,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, nanosecondsNow, null, null, null, null,
null,
null, null, Utils.toByte(checkStatus)));
return checkStatus;
})
Expand Down

0 comments on commit 775f98d

Please sign in to comment.