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

[Non-Inclusive Language] Replace master in comments #1778

Merged
merged 1 commit into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/server/http/http_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class HttpService
* Indicates if http server has configured to start listening on a configured port.
* We shouldn't start http service in two cases:
* 1. If `server.autoListen` is explicitly set to `false`.
* 2. When the process is run as dev cluster master in which case cluster manager
* 2. When the process is run as dev cluster manager.
* will fork a dedicated process where http service will be set up instead.
* @internal
* */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const getNodeId = async (
})) as ApiResponse;
/* Aggregate different cluster_ids from the OpenSearch nodes
* if all the nodes have the same cluster_id, retrieve nodes.info from _local node only
* Using _cluster/state/nodes to retrieve the cluster_id of each node from master node which is considered to be a lightweight operation
* Using _cluster/state/nodes to retrieve the cluster_id of each node from cluster manager node which is considered to be a lightweight operation
* else if the nodes have different cluster_ids then fan out the request to all nodes
* else there are no nodes in the cluster
*/
Expand Down Expand Up @@ -214,7 +214,7 @@ export const pollOpenSearchNodesVersion = ({
* Originally, Dashboards queries OpenSearch cluster to get the version info of each node and check the version compatibility with each node.
* The /nodes request could fail even one node in cluster fail to response
* For better dashboards resilience, the behaviour is changed to only query the local node when all the nodes have the same cluster_id
* Using _cluster/state/nodes to retrieve the cluster_id of each node from the master node
* Using _cluster/state/nodes to retrieve the cluster_id of each node from the cluster manager node
*/
if (optimizedHealthcheckId) {
return from(getNodeId(internalClient, optimizedHealthcheckId)).pipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,19 @@ async function fetchLicense(opensearchClient: OpenSearchClient, local: boolean)
* Like any X-Pack related API, X-Pack must installed for this to work.
*
* In OSS we'll get a 400 response using the new opensearch client.
* @deprecated
*/
async function getLicenseFromLocalOrMaster(opensearchClient: OpenSearchClient) {
// Fetching the local license is cheaper than getting it from the master node and good enough
async function getLicenseFromLocalOrClusterManager(opensearchClient: OpenSearchClient) {
// Fetching the local license is cheaper than getting it from the cluster manager node and good enough
const { license } = await fetchLicense(opensearchClient, true).catch(async (err) => {
if (cachedLicense) {
try {
// Fallback to the master node's license info
// Fallback to the cluster manager node's license info
const response = await fetchLicense(opensearchClient, false);
return response;
} catch (masterError) {
if ([400, 404].includes(masterError.statusCode)) {
// If the master node does not have a license, we can assume there is no license
} catch (clusterManagerError) {
if ([400, 404].includes(clusterManagerError.statusCode)) {
// If the cluster manager node does not have a license, we can assume there is no license
cachedLicense = undefined;
} else {
throw err;
Expand All @@ -77,7 +78,7 @@ async function getLicenseFromLocalOrMaster(opensearchClient: OpenSearchClient) {
}

export const getLocalLicense: LicenseGetter = async (clustersDetails, { opensearchClient }) => {
const license = await getLicenseFromLocalOrMaster(opensearchClient);
const license = await getLicenseFromLocalOrClusterManager(opensearchClient);
// It should be called only with 1 cluster element in the clustersDetails array, but doing reduce just in case.
return clustersDetails.reduce((acc, { clusterUuid }) => ({ ...acc, [clusterUuid]: license }), {});
};
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ export function dateHistogram(
? getDateHistogramForLastBucketMode()
: getDateHistogramForEntireTimerangeMode();

// master

overwrite(doc, `aggs.${series.id}.meta`, {
timeField,
intervalString,
Expand Down