Skip to content

Commit

Permalink
do not show individual processors in managed instance (#24302)
Browse files Browse the repository at this point in the history
  • Loading branch information
barbaravaldez authored Sep 6, 2023
1 parent 32817ae commit 77ea6d7
Showing 1 changed file with 28 additions and 19 deletions.
47 changes: 28 additions & 19 deletions extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,37 +369,46 @@ export class ServerPropertiesDialog extends ObjectManagementDialogBase<Server, S
let nodes: NumaNode[] = this.objectInfo.numaNodes;
let nodeTableList: azdata.TableComponent[] = [];
let tableGroups: azdata.GroupContainer[] = [];
for (let node of nodes) {
let table = this.createProcessorTable(node);
nodeTableList.push(table);
tableGroups.push(this.createGroup(localizedConstants.serverNumaNodeLabel(node.numaNodeId), [table], true));

if (isEnabled) {
for (let node of nodes) {
let table = this.createProcessorTable(node);
nodeTableList.push(table);
tableGroups.push(this.createGroup(localizedConstants.serverNumaNodeLabel(node.numaNodeId), [table], true));
}
}

this.autoSetProcessorAffinityMaskForAllCheckbox = this.createCheckbox(localizedConstants.autoSetProcessorAffinityMaskForAllText, async (newValue) => {
this.objectInfo.autoProcessorAffinityMaskForAll = newValue;
for (let table of nodeTableList) {
let newData = table.data;
for (let i = 0; i < newData.length; i++) {
if (newValue) {
// if affinity mask for all is checked, then uncheck the individual processors
newData[i][AffinityType.ProcessorAffinity] = false;
if (isEnabled) {
for (let table of nodeTableList) {
let newData = table.data;
for (let i = 0; i < newData.length; i++) {
if (newValue) {
// if affinity mask for all is checked, then uncheck the individual processors
newData[i][AffinityType.ProcessorAffinity] = false;
}
}
await this.setTableData(table, newData);
}
await this.setTableData(table, newData);
}

}, this.objectInfo.autoProcessorAffinityMaskForAll, isEnabled);

this.autoSetProcessorIOAffinityMaskForAllCheckbox = this.createCheckbox(localizedConstants.autoSetProcessorAffinityIOMaskForAllText, async (newValue) => {
this.objectInfo.autoProcessorAffinityIOMaskForAll = newValue;
for (let table of nodeTableList) {
let newData = table.data;
for (let i = 0; i < newData.length; i++) {
if (newValue) {
// if IO affinity mask for all is checked, then uncheck the individual processors
newData[i][AffinityType.IOAffinity] = false;
if (isEnabled) {
for (let table of nodeTableList) {
let newData = table.data;
for (let i = 0; i < newData.length; i++) {
if (newValue) {
// if IO affinity mask for all is checked, then uncheck the individual processors
newData[i][AffinityType.IOAffinity] = false;
}
}
await this.setTableData(table, newData);
this.resetNumaNodes();
}
await this.setTableData(table, newData);
this.resetNumaNodes();
}
}, this.objectInfo.autoProcessorAffinityIOMaskForAll, isEnabled);

Expand Down

0 comments on commit 77ea6d7

Please sign in to comment.