Skip to content

Commit e16dd74

Browse files
wu-shengCopilot
andauthored
Update src/main/java/org/apache/skywalking/banyandb/v1/client/StreamWrite.java
Co-authored-by: Copilot <[email protected]>
1 parent 70ae8ff commit e16dd74

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/apache/skywalking/banyandb/v1/client/StreamWrite.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ public void setTimestamp(long timestamp) {
6666
*/
6767
@Override
6868
protected BanyandbStream.WriteRequest build(BanyandbCommon.Metadata metadata) {
69-
if (!timestamp.isPresent() || timestamp.get() <= 0) {
70-
throw new IllegalArgumentException("timestamp is invalid.");
69+
throw new IllegalArgumentException("Timestamp is required and must be greater than 0 for stream writes.");
7170
}
7271
Timestamp ts = Timestamp.newBuilder()
7372
.setSeconds(timestamp.get() / 1000)

0 commit comments

Comments
 (0)