Skip to content

Conversation

@Wudadada
Copy link
Contributor

@Wudadada Wudadada commented Jul 8, 2024

Purpose of this pull request

According to the documentation, the logic for DROP_DATA is to preserve the database structure and delete the data. The original implementation deleted the entire index and recreated it, which caused some field types and parameters to change. This PR corrects the implementation to use the Elasticsearch command to clear index data while preserving the index structure:
POST /your_index_name/_delete_by_query { "query": { "match_all": {} } }

Does this PR introduce any user-facing change?

No

How was this patch tested?

By running the connector-elasticsearch-e2e and my local es seatunnel task.

Check list

@Hisoka-X Hisoka-X added the First-time contributor First-time contributor label Jul 8, 2024
@Hisoka-X
Copy link
Member

Hisoka-X commented Jul 8, 2024

cc @chl-wxp as well.

@Hisoka-X
Copy link
Member

Hisoka-X commented Jul 8, 2024

Thanks @Wudadada for created this PR! Could you follow the guide to open github action on your fork repository? https://github.com/apache/seatunnel/pull/7124/checks?check_run_id=27141444120

@Hisoka-X
Copy link
Member

Hisoka-X commented Jul 8, 2024

cc @hailin0 as well.

@Hisoka-X
Copy link
Member

Hisoka-X commented Jul 8, 2024

Could you add a test case in

to make sure all data are be deleted?

@Wudadada
Copy link
Contributor Author

Wudadada commented Jul 9, 2024

Could you add a test case in

to make sure all data are be deleted?

Thanks for pointing out the issues! I encountered a problem in #7140 that is preventing me from debugging, and I am trying to solve the situation.

Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @Wudadada !

@hailin0 hailin0 merged commit bb9fd51 into apache:dev Jul 9, 2024
hawk9821 pushed a commit to hawk9821/seatunnel that referenced this pull request Jul 10, 2024
Thomas-HuWei pushed a commit to zilliztech/seatunnel that referenced this pull request Jul 10, 2024
Thomas-HuWei pushed a commit to zilliztech/seatunnel that referenced this pull request Jul 10, 2024
hawk9821 pushed a commit to hawk9821/seatunnel that referenced this pull request Jul 13, 2024
chaorongzhi pushed a commit to chaorongzhi/seatunnel that referenced this pull request Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants