doc/developer-guide/xlator-classification.md
The purpose of the document is to define a category for various xlators and expectations around what each category means from a perspective of health and maintenance of a xlator.
The need to do this is to ensure certain categories are kept in good health, and helps the community and contributors focus their efforts around the same.
This document also provides implementation details for xlator developers to declare a category for any xlator.
This document is intended for the following community participants,
For a more user facing understanding it is recommended to read section (TBD) in the gluster documentation.
Developed in the experimental branch, for exploring new features. These xlators are NEVER packaged as a part of releases, interested users and contributors can build and work with these from sources. In the future, these maybe available as an package based on a weekly build of the same.
Xlators in master or release branches that are not deemed fit to be in production deployments, but are feature complete to invite feedback and host user data.
These xlators will be worked upon with priority by maintainers/authors who are involved in making them more stable than xlators in the Experimental/Deprecated/ Obsolete categories.
There is no guarantee that these xlators will move to the Maintained state, and may just get Obsoleted based on feedback, or other project goals or technical alternatives.
These xltors are part of the core Gluster functionality and are maintained actively. These are part of master and release branches and are higher in priority of maintainers and other interested contributors.
NOTE: A short note on what each of these mean are added here, details to follow.
NOTE: Out of the gate all of the following are not mandated, consider the following a desirable state to reach as we progress on each
Xlators on master or release branches that would be obsoleted and/or replaced with similar or other functionality in the next major release.
Xlator/code still in tree, but not packaged or shipped or maintained in any form. This is noted as a category till the code is removed from the tree.
These xlators and their corresponding code and test health will not be executed.
While defining 'xlator_api_t' structure for the corresponding xlator, add a flag like below:
diff --git a/xlators/performance/nl-cache/src/nl-cache.c b/xlators/performance/nl-cache/src/nl-cache.c
index 0f0e53bac2..8267d6897c 100644
--- a/xlators/performance/nl-cache/src/nl-cache.c
+++ b/xlators/performance/nl-cache/src/nl-cache.c
@@ -869,4 +869,5 @@ xlator_api_t xlator_api = {
.cbks = &nlc_cbks,
.options = nlc_options,
.identifier = "nl-cache",
+ .category = GF_TECH_PREVIEW,
};
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 8d39720e7f..235de27c19 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -1702,4 +1702,5 @@ xlator_api_t xlator_api = {
.cbks = &qr_cbks,
.options = qr_options,
.identifier = "quick-read",
+ .category = GF_MAINTAINED,
};
Similarly, if a particular option is in different state other than the xlator state, one can add the same flag in options structure too.
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index 0e86e33d03..81996743d1 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -772,6 +772,7 @@ struct volume_options options[] = {
.description = "Maximum latency for shd halo replication in msec."
},
{ .key = {"halo-enabled"},
+ .category = GF_TECH_PREVIEW,
.type = GF_OPTION_TYPE_BOOL,
.default_value = "False",
This section details which category of xlators can be used when and specifics around when each category is enabled.
Maintained category xlators can be used by default, this implies, volumes created with these xlators enabled will throw no warnings, or need no user intervention to use the xlator.
Tech Preview category xlators needs cluster configuration changes to allow these xlatorss to be used in volumes, further, logs will contain a message stating TP xlators are in use. Without the cluster configured to allow TP xlators, volumes created or edited to use such xlators would result in errors.
Obsolete category xlators will not be packaged and hence cannot be used from release builds.
Experimental category xlators will not be packaged and hence cannot be used from release builds, if running experimental (weekly or other such) builds, these will throw a warning in the logs stating experimental xlators are in use.
(TBD) Need to provide the ability to query xlator categories, or list xlators and their respective categories.
User facing changes that are expected due to this change include the following,