Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Allow dynamic classes in is_valid_class
This adds support for dynamic classes in IOQ2. Before this change, the allowed set of classes was fixed and hardcoded, with no way for 3rd party IO traffic to be prioritized, and similarly, no way for 3rd party IO traffic to bypass IOQ based on config settings. This change switches to checking to see if there's a declared IO priority value in the classes config, and if so it is treated as a valid value. It's worth noting that because `ioq_config:set_class_config` uses the `is_valid_class` check, you must use `config:set` directly to declare an initial priority for the dynamic channel before being able to use the `ioq_config` helpers. This change was motivated by not being able to bypass search in the Dreyfus project, as it piggy-backed off of `interactive` and `view_update` channels. That was rectified in [1], and now Dreyfus uses the `search` IOQ channel. As that is not used in CouchDB directly, this commit adds the dynamic class support based off of config values, rather than specifically hardcoding search, so that it can be used by any 3rd party services running IO traffic through IOQ. [1] cloudant-labs/dreyfus@75d86c4
- Loading branch information