Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: panic when UNIX epoch time out of i64 range #16094

Closed
MrCroxx opened this issue Apr 2, 2024 · 4 comments
Closed

bug: panic when UNIX epoch time out of i64 range #16094

MrCroxx opened this issue Apr 2, 2024 · 4 comments
Assignees
Labels
no-issue-activity type/bug Something isn't working
Milestone

Comments

@MrCroxx
Copy link
Contributor

MrCroxx commented Apr 2, 2024

Describe the bug

In https://github.com/risingwavelabs/risingwave/blob/v1.7.1/src/connector/src/parser/unified/json.rs#L438-L449 , we convert the input into i64 and parse the timestamp with it. RW will panic if the given range is out of i64 range.

Error message/log

2024-04-02 14:54:13 thread 'rw-streaming' panicked at src/connector/src/parser/unified/json.rs:447:52:
2024-04-02 14:54:13 called `Option::unwrap()` on a `None` value

To Reproduce

{
	"before": null,
	"after": {
	    "id": 12,
        "example_timestamp_tz": 12852202631933722624
    },
	"source": {
		"table": "pathmetadata"
	},
	"op": "c",
	"ts_ms": 1707225270445
}

Expected behavior

The timestamp should be Saturday, 9 April 2377.

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@MrCroxx MrCroxx added the type/bug Something isn't working label Apr 2, 2024
@github-actions github-actions bot added this to the release-1.8 milestone Apr 2, 2024
@MrCroxx MrCroxx assigned tabVersion and wangrunji0408 and unassigned tabVersion Apr 2, 2024
@tabVersion
Copy link
Contributor

I don't quite get the problem here, for a real-world workload, the json format limits integers by 2^53, much smaller than i64 range. The problem seems unreachable.

@xiangjinwu
Copy link
Contributor

WIll not panic but will return err (and converted into null) after #16265

Copy link
Contributor

github-actions bot commented Jul 3, 2024

This issue has been open for 60 days with no activity.
If you think it is still relevant today, and needs to be done in the near future, you can comment to update the status, or just manually remove the no-issue-activity label.
You can also confidently close this issue as not planned to keep our backlog clean. Don't worry if you think the issue is still valuable to continue in the future. It's searchable and can be reopened when it's time. 😄

@xxchan
Copy link
Member

xxchan commented Jul 3, 2024

WIll not panic but will return err (and converted into null) after #16265

So this issue can be closed?

@xxchan xxchan closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-issue-activity type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants