-
Notifications
You must be signed in to change notification settings - Fork 392
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
[#3924] improvemet(core): Switch default entity store from KV to relational #3954
Changes from 14 commits
be5fa46
152bc33
66e37b0
8de179f
8df416c
0391e54
73931dd
b1fde5d
0df339d
2d545a6
a76a8fc
34f796c
bc9f253
3296175
7bba384
cc41346
291c999
2297fa4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,14 +149,14 @@ Integer updateCatalogMeta( | |
@Update( | ||
"UPDATE " | ||
+ TABLE_NAME | ||
+ " SET deleted_at = UNIX_TIMESTAMP(CURRENT_TIMESTAMP(3)) * 1000.0" | ||
+ " SET deleted_at =(UNIX_TIMESTAMP() * 1000.0) + EXTRACT(MICROSECOND FROM CURRENT_TIMESTAMP(3)) / 1000" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't remove the whitespace here. Also can you please check it this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have checked: The reason why I modified here is that for H2, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this sql dialect only supported by for H2, MySQL, how do you handle other embedded database or other databases like PG? You will definitely have a chance to meet microsecond issues even not for embedded database. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah, I would be another issue. I need these changes to make SQL between H2 and MySQL work now. When It comes to other dialects like PG or Oracle, we need to design a mechanism that can be adapted to several different databases. This seems to be beyond the scope of this PR. |
||
+ " WHERE catalog_id = #{catalogId} AND deleted_at = 0") | ||
Integer softDeleteCatalogMetasByCatalogId(@Param("catalogId") Long catalogId); | ||
|
||
@Update( | ||
"UPDATE " | ||
+ TABLE_NAME | ||
+ " SET deleted_at = UNIX_TIMESTAMP(CURRENT_TIMESTAMP(3)) * 1000.0" | ||
+ " SET deleted_at = (UNIX_TIMESTAMP() * 1000.0) + EXTRACT(MICROSECOND FROM CURRENT_TIMESTAMP(3)) / 1000" | ||
+ " WHERE metalake_id = #{metalakeId} AND deleted_at = 0") | ||
Integer softDeleteCatalogMetasByMetalakeId(@Param("metalakeId") Long metalakeId); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove any kv, rocksdb related wordings here, as this is already deprecated, we should remove form configuration file and use h2 as a default one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it