Skip to content

Commit

Permalink
IGNITE-24053 (minor) Added TODO.
Browse files Browse the repository at this point in the history
  • Loading branch information
xtern committed Jan 21, 2025
1 parent 3e7f227 commit 19dbf65
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
* An extension to JDBC request that provides the ability to update and read client observable time.
*/
abstract class JdbcObservableTimeAwareRequest {
/** Holds the latest time observed by client. */
/** Tracker of the latest time observed by client. */
@SuppressWarnings("TransientFieldInNonSerializableClass")
private final transient HybridTimestampTracker timestampTracker = HybridTimestampTracker.atomicTracker(null);

/** Returns the holder with the latest time observed by client. */
/** Returns the tracker of the latest time observed by client. */
public HybridTimestampTracker timestampTracker() {
return timestampTracker;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ private void processOperation(ChannelHandlerContext ctx, ClientMessageUnpacker i
case ClientOp.SQL_EXEC_SCRIPT:
return ClientSqlExecuteScriptRequest.process(in, queryProcessor).thenRun(() -> {
if (out.meta() == null) {
// TODO https://issues.apache.org/jira/browse/IGNITE-24275 Must set updated time instead of current time.
out.meta(clockService.current());
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ public static CompletableFuture<Void> process(
boolean commit = in.unpackBoolean();

return handler.finishTxAsync(connectionId, commit).thenAccept(res -> {
if (commit) {
out.meta(res.observableTime());
}
out.meta(res.observableTime());

res.writeBinary(out);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public static CompletableFuture<Void> process(
arguments = ArrayUtils.OBJECT_EMPTY_ARRAY;
}

// TODO https://issues.apache.org/jira/browse/IGNITE-24275 Script must return updated time to client.
HybridTimestamp clientTs = HybridTimestamp.nullableHybridTimestamp(in.unpackLong());
var tsUpdater = HybridTimestampTracker.clientTracker(clientTs, ts -> {});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ public interface InternalTransaction extends Transaction {
HybridTimestamp startTimestamp();

/**
* Returns observable timestamp.
* Returns an observable timestamp provided by the observable timestamp tracker.
*
* @return observable timestamp.
* @return observable timestamp, or {@code null} if the observable time has not yet been initialized/updated.
*/
@Nullable HybridTimestamp observableTimestamp();

Expand Down

0 comments on commit 19dbf65

Please sign in to comment.