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

Propagate triggers affecting distributed tables #74

Open
coryfoo opened this issue Feb 9, 2015 · 1 comment
Open

Propagate triggers affecting distributed tables #74

coryfoo opened this issue Feb 9, 2015 · 1 comment
Labels

Comments

@coryfoo
Copy link

coryfoo commented Feb 9, 2015

It would be nice if triggers associated with a table were automatically propagated across all databases when the table sharding occurs. Perhaps it could be an optional flag, as I could envision scenarios where this might be undesirable.

@jasonmp85
Copy link
Collaborator

Quoting your mailing list post:

We have some triggers that run on INSERT, DELETE, and UPDATE (for a specific column value) of one of our biggest tables (the primary target for sharding). It is critical that these triggers still function when writing into the distributed tables. One caveat, however, is that it would be a burden for the trigger to fire multiple times in the case of a replicated shard. We are using these triggers as a way to track necessary updates to another datastore based on specific conditions.

In your particular case, which would be most desirable:

  • Triggers are propagated to worker shards and take action locally on each shard
  • The master node evaluates the trigger and takes some action after a successful modification to a distributed table

This is a pretty big feature space, so details will help us evaluate feasibility in the future.

Additionally: You said your triggers run after a successful modification. What do they do? Are they writing to some other table? Enqueuing a job? If they do write to another table, would you need that table to be distributed as well?

@jasonmp85 jasonmp85 changed the title Propagate triggers affecting sharded tables Propagate triggers affecting distributed tables Feb 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants