-
Notifications
You must be signed in to change notification settings - Fork 3
refactor import/sync drop dtable-server view-rows #429
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
base: master
Are you sure you want to change the base?
Conversation
ce93511 to
84a09d3
Compare
84a09d3 to
173a3f6
Compare
| if not src_view: | ||
| set_common_dataset_invalid(dataset_id, db_session) | ||
| set_common_dataset_sync_invalid(dataset_sync_id, db_session) | ||
| logging.error('Source view not found.') |
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.
设置为无效的,日志应该是warning
| except Exception as e: | ||
| logging.error('request dst dtable: %s error: %s', dst_dtable_uuid, e) | ||
| return | ||
| src_enable_archive = (src_dtable_metadata.get('settings') or {}).get('enable_archive', False) |
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.
这个目前需要判断是否是归档数据吗
| if not transfered_column: | ||
| continue | ||
|
|
||
| if to_archive and col['key'] in ['_creator', '_ctime', '_last_modifier', '_mtime']: |
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.
to_archive是用于处理,同步归档数据吗
| } | ||
|
|
||
|
|
||
| def delete_dst_rows(dst_dtable_uuid, dst_table_name, to_be_deleted_row_ids, dst_dtable_db_api, dst_dtable_server_api, to_archive): |
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.
归档和非归档数据都可以使用dtable-db的接口删除
| updates = [] | ||
| for row in to_be_updated_rows[i: i+step]: | ||
| updates.append({ | ||
| def update_dst_rows(dst_dtable_uuid, dst_table_name, to_be_updated_rows, dst_dtable_db_api, dst_dtable_server_api, to_archive): |
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.
归档和非归档数据都可以使用dtable-db的接口更新
59815e1 to
a38891e
Compare
No description provided.