Add server time to remote config fetch

Enable clients to very roughly adjust some actions for clock skew by
providing current server time in the remote config fetch.
This commit is contained in:
Ehren Kret
2023-06-21 16:08:46 -05:00
parent 0122b410be
commit cc3cab9c88
2 changed files with 14 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.time.Clock;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -91,7 +92,7 @@ public class RemoteConfigController {
config.getUuids());
return new UserRemoteConfig(config.getName(), inBucket,
inBucket ? config.getValue() : config.getDefaultValue());
}), globalConfigStream).collect(Collectors.toList()));
}), globalConfigStream).collect(Collectors.toList()), Clock.systemUTC().instant());
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
}