Comments (2)
Can you share what you have for these relevant configs? Routing namespaces should be configured to be the MongoDB name-space(s) that you are redirecting, not the destiny (index) your plugin sends to.
# tell monstache don't assume where ANY deleted doc will be, instead search for it by id
routing-namespaces = [ "" ]
# optional, instead, to be very specific, tell monstache you are redirecting events
# from source namespace my_db.collection
# routing-namespaces = [ "my_db.collection" ]
# this is already the default (stateless)
delete-strategy = 0
# optional, if you still haven't had success you can try enabled this, allows monstache to delete more than 1 doc in Elastic
# if multiple docs match on the id
disable-delete-protection = true
# optional, if you want to restrict monstache to only search for docs to delete according to an index pattern
# the default is to search all indices
delete-index-pattern = "my_db.collection*"
Relevant delete handling code here:
Line 4003 in 39b8a25
Make sure it's going into the stateless block and that it's performing a search by having the following return true.
if routingNamespaces[""] || routingNamespaces[op.Namespace] {
If all else fails, you already have a go plugin, so you can implement the delete yourself by adding a Process
function.
// all events including deletes flow through here.
func Process(input*monstachemap.ProcessPluginInput) error
from monstache.
I saw the problem trying to create my own solution. The watch
event for deletion isn't like other ones that provide the doc body. So in my case that I was trying to route the deletion to the right index based on a value present on the doc it couldn't work.
So I created a delete-index-pattern = "my_db.collection*"
on my config. It's not a solution with a wonderful performance (we need to search across all the indexes) but in my case, most of the records are updated to a status of removed instead of a record remotion so it will be performed rarely
Thank you for your help @rwynn !
from monstache.
Related Issues (20)
- Further understanding of the worker mode
- ARM64 Docker Image
- Failed to find unique document using index pattern While document exists
- elasticsearch-max-bytes not effective, still error : Error 413 (Request Entity Too Large)
- Support for Kibana SSL authentication HOT 1
- CVE-2022-37434 HOT 2
- Records are missing in sync HOT 5
- linux/arm64 docker images HOT 4
- Creating multiple indices for one collection on resume HOT 1
- Configure monstache to sync all collections in database
- How save in index data stream
- Monstache did not back off writing data when ElasticSearch disk was full (http code 429), causing log spam HOT 3
- Can't connect Monstache(local machine) with my MongoDB containers(3 replicas) and elasticsearch containers.
- Version conflict on collection relation
- Monstache starts backoff when getting 404 (deleted object is already deleted in ES) HOT 2
- Bug: Setting mongodb field value to null does not index it in Elasticsearch HOT 5
- Add an option to include mongo change stream in health check
- Obsessive-compulsive reading disorder
- Order of monstache golang functions execution
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monstache.