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

Need INSERT IGNORE support #838

Open
webigorkiev opened this issue Jul 28, 2022 · 7 comments
Open

Need INSERT IGNORE support #838

webigorkiev opened this issue Jul 28, 2022 · 7 comments
Assignees

Comments

@webigorkiev
Copy link

Hello
Is it possible to add support for INSERT IGNORE?

In my case, the index is constantly updated in real time, but sometimes full sync is needed.

The problem is that at the time of bulk inserting (After TRUNCATE) - another processes insert records and I get a duplicate id error

Thanks

@sanikolaev
Copy link
Collaborator

Are you sure you want INSERT IGNORE and not REPLACE?

@sanikolaev sanikolaev added the waiting Waiting for the original poster (in most cases) or something else label Jul 29, 2022
@webigorkiev
Copy link
Author

Replace is the first thing I thought of.
But, when sync, I already have all the index data in my memory, and new data arrives in real time.
Replace will overwrite new data with stale data.

The possibility of a bulk insertion of data is needed - without changing existing ones.

@sanikolaev sanikolaev removed the waiting Waiting for the original poster (in most cases) or something else label Jul 29, 2022
@sanikolaev
Copy link
Collaborator

Got it. We'll discuss it. Perhaps it's a low hanging fruit that we can easily implement, then we'll include it into the next release.

@githubmanticore
Copy link
Contributor

➤ Sergey Nikolaev commented:

Perhaps it's a low hanging fruit that we can easily implement

After discussion with the core team it turned out to be quite complex task, so I'm afraid we can't prioritize this.

@scruel
Copy link

scruel commented Apr 3, 2024

➤ Sergey Nikolaev commented:

Perhaps it's a low hanging fruit that we can easily implement

After discussion with the core team it turned out to be quite complex task, so I'm afraid we can't prioritize this.

How about have it in bulk?

@sanikolaev
Copy link
Collaborator

Things have changed since 2022 and now we have a tool to solve this task easily - Manticore Buddy. PRs are welcome. Here's a blog post about it https://manticoresearch.com/blog/manticoresearch-buddy-pluggable-design/

@djklim87
Copy link
Contributor

After our discussion, we have decided that this feature cannot be implemented in Buddy. Potentially, we could encounter large batches of inserts, and parsing that query within Buddy would be a very bad idea as it could significantly slow down the plugin and the entire Buddy extension. Instead, it should be implemented in the searchd daemon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants