feathersjs-ecosystem / feathers-sync

Synchronize service events between Feathers application instances
MIT License
221 stars 41 forks source link

Infinite Loop with Alias Services #153

Closed mrfrase3 closed 3 years ago

mrfrase3 commented 3 years ago

Steps to reproduce

re-register a service as an alias, then do a create/patch/remove

app.use('/bookings/templates', createService(options));
const service = app.service('bookings/templates');
service.hooks(hooks);
app.use('/bookings-templates', service);

Expected behavior

The event should propagate to all registered instances once

Actual behavior

The event winds up in an infinite loop, continually sending the event to all other instances. This causes CPU, RAM, and bandwidth spikes on both the instance servers and Redis server.