Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 2 additions & 0 deletions sdk/messaging/azeventhubs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### Bugs Fixed

- Processor distributes partitions optimally, which would result in idle or over-assigned processors. (PR#22153)

### Other Changes

## 1.0.2 (2023-11-07)
Expand Down
5 changes: 5 additions & 0 deletions sdk/messaging/azeventhubs/inmemory_checkpoint_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package azeventhubs

import (
"context"
"sort"
"strings"
"sync"
"testing"
Expand Down Expand Up @@ -277,6 +278,10 @@ func (cps *testCheckpointStore) ListOwnership(ctx context.Context, fullyQualifie
ownerships = append(ownerships, v)
}

sort.Slice(ownerships, func(i, j int) bool {
return ownerships[i].PartitionID < ownerships[j].PartitionID
})

return ownerships, nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ matrix:
prefetch: 0
verbose: ""
sleepAfter: "5m"
multibalance:
testTarget: multibalance
rounds: 20
verbose: ""
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,25 @@
"apiVersion": "[variables('apiVersion')]",
"name": "[variables('authorizationName')]",
"location": "[variables('location')]",
"dependsOn": ["[resourceId('Microsoft.EventHub/namespaces', variables('namespaceName'))]"],
"dependsOn": [
"[resourceId('Microsoft.EventHub/namespaces', variables('namespaceName'))]"
],
"properties": {
"rights": ["Listen", "Manage", "Send"]
"rights": [
"Listen",
"Manage",
"Send"
]
}
},
{
"type": "Microsoft.EventHub/namespaces/eventhubs",
"apiVersion": "[variables('apiVersion')]",
"name": "[variables('eventHubNameFull')]",
"location": "[variables('location')]",
"dependsOn": ["[resourceId('Microsoft.EventHub/namespaces', variables('namespaceName'))]"],
"dependsOn": [
"[resourceId('Microsoft.EventHub/namespaces', variables('namespaceName'))]"
],
"properties": {
"messageRetentionInDays": 7,
"partitionCount": 32
Expand All @@ -73,7 +81,9 @@
"apiVersion": "[variables('apiVersion')]",
"name": "[concat(variables('namespaceName'), '/default')]",
"location": "[variables('location')]",
"dependsOn": ["[resourceId('Microsoft.EventHub/namespaces', variables('namespaceName'))]"],
"dependsOn": [
"[resourceId('Microsoft.EventHub/namespaces', variables('namespaceName'))]"
],
"properties": {
"defaultAction": "Deny",
"virtualNetworkRules": [],
Expand Down Expand Up @@ -127,13 +137,15 @@
"name": "[concat('default/', variables('containerName'))]",
"type": "blobServices/containers",
"apiVersion": "[variables('storageApiVersion')]",
"dependsOn": ["[variables('storageAccountName')]"]
"dependsOn": [
"[variables('storageAccountName')]"
]
}
]
},
],
"outputs": {
"EVENTHUB_NAME": {
"EVENTHUB_NAME_STRESS": {
"type": "string",
"value": "[variables('eventHubName')]"
},
Expand Down
2 changes: 2 additions & 0 deletions sdk/messaging/azeventhubs/internal/eh/stress/stress.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ func main() {
fn func(ctx context.Context) error
}{
{name: "batch", fn: tests.BatchStressTester},
{name: "balance", fn: tests.BalanceTester},
{name: "multibalance", fn: tests.MultiBalanceTester},
{name: "processor", fn: tests.ProcessorStressTester},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ spec:
- >
set -ex;
mkdir -p "$DEBUG_SHARE";
{{if eq .Stress.testTarget "multibalance" }}
/app/stress "{{.Stress.testTarget}}" "-rounds" "{{.Stress.rounds}}" "{{.Stress.verbose}}" 2>&1 | tee -a "${DEBUG_SHARE}/{{ .Stress.Scenario }}-`date +%s`.log";
{{else}}
/app/stress "{{.Stress.testTarget}}" "-rounds" "{{.Stress.rounds}}" "-prefetch" "{{.Stress.prefetch}}" "{{.Stress.verbose}}" "-sleepAfter" "{{.Stress.sleepAfter}}" 2>&1 | tee -a "${DEBUG_SHARE}/{{ .Stress.Scenario }}-`date +%s`.log";
{{end}}
# Pulls the image on pod start, always. We tend to push to the same image and tag over and over again
# when iterating, so this is a must.
imagePullPolicy: Always
Expand Down
Loading