Skip to content

Commit

Permalink
SDK supports checkpoint feature
Browse files Browse the repository at this point in the history
  • Loading branch information
doleyzi committed Mar 29, 2024
1 parent 260cb6f commit fd0525d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public synchronized void flush() {
* Flush audit data
*/
public synchronized void flush(long isolateKey) {
if (flushTime.putIfAbsent(isolateKey, Calendar.getInstance().getTimeInMillis()) != null
if (flushTime.putIfAbsent(isolateKey, System.currentTimeMillis()) != null
|| flushStat.addAndGet(1) > flushStatThreshold) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,10 @@ public void onMessageReceived(ChannelHandlerContext ctx, byte[] msg) {
if (data == null) {
LOG.error("Can not find the request id onMessageReceived {},message: {}",
requestId, baseCommand.getAuditReply().getMessage());
for (Map.Entry<Long, AuditData> entry : this.dataMap.entrySet()) {
LOG.debug("Data map key:{},request id:{}", entry.getKey(), requestId);
if (LOG.isDebugEnabled()) {
for (Map.Entry<Long, AuditData> entry : this.dataMap.entrySet()) {
LOG.debug("Data map key:{},request id:{}", entry.getKey(), requestId);
}
}
return;
}
Expand Down

0 comments on commit fd0525d

Please sign in to comment.