Skip to content

Commit acf1bd4

Browse files
authored
Merge pull request #204826 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/azure-docs (branch main)
2 parents 00a9683 + 2f2eb2f commit acf1bd4

File tree

5 files changed

+42
-7
lines changed

5 files changed

+42
-7
lines changed

articles/container-instances/container-instances-vnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ When you deploy to a new virtual network by using this method, the deployment ca
5959

6060
To deploy a container group to an existing virtual network:
6161

62-
1. Create a subnet within your existing virtual network, use an existing subnet in which a container group is already deployed, or use an existing subnet emptied of *all* other resources
62+
1. Create a subnet within your existing virtual network, use an existing subnet in which a container group is already deployed, or use an existing subnet emptied of *all* other resources and configuration.
6363
1. Deploy a container group with [az container create][az-container-create] and specify one of the following:
6464
* Virtual network name and subnet name
6565
* Virtual network resource ID and subnet resource ID, which allows using a virtual network from a different resource group

articles/open-datasets/dataset-oj-sales-simulated.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The data contains weekly sales of orange juice over 121 weeks. There are 3,991 s
5656
```python
5757
from azureml.core.workspace import Workspace
5858
ws = Workspace.from_config()
59-
datastore = ws.get_default_config()
59+
datastore = ws.get_default_datastore()
6060
```
6161

6262
```python
@@ -203,4 +203,4 @@ if sys.platform == 'linux':
203203

204204
## Next steps
205205

206-
View the rest of the datasets in the [Open Datasets catalog](dataset-catalog.md).
206+
View the rest of the datasets in the [Open Datasets catalog](dataset-catalog.md).

articles/service-fabric/service-fabric-concepts-partitioning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ As we literally want to have one partition per letter, we can use 0 as the low k
121121
2. In the **New Project** dialog box, choose the Service Fabric application.
122122
3. Call the project "AlphabetPartitions".
123123
4. In the **Create a Service** dialog box, choose **Stateful** service and call it "Alphabet.Processing".
124-
5. Set the number of partitions. Open the Applicationmanifest.xml file located in the ApplicationPackageRoot folder of the AlphabetPartitions project and update the parameter Processing_PartitionCount to 26 as shown below.
124+
5. Set the number of partitions. Open the ApplicationManifest.xml file located in the ApplicationPackageRoot folder of the AlphabetPartitions project and update the parameter Processing_PartitionCount to 26 as shown below.
125125

126126
```xml
127127
<Parameter Name="Processing_PartitionCount" DefaultValue="26" />

articles/service-fabric/service-fabric-reliable-actors-enumerate.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,41 @@ do
5353
while (continuationToken != null);
5454
```
5555

56+
While the code above will retrieve all the actors in a given partition, occasionally the need will arise to query the IDs of all actors (active or inactive) across each partition. This should be done by exception as it's quite a heavy task.
57+
58+
The following example demonstrates how to query the partitions of the service and iterate through each in combination with the above example to produce a list of all the active and inactive actors in the service across the Service Fabric application:
59+
60+
61+
```csharp
62+
63+
var serviceName = new Uri("fabric:/MyApp/MyService");
64+
65+
//As the FabricClient is expensive to create, it should be shared as much as possible
66+
FabricClient fabricClient = new();
67+
68+
//List each of the service's partitions
69+
ServicePartitionList partitions = await fabricClient.QueryManager.GetPartitionListAsync(serviceName);
70+
71+
List<Guid> actorIds = new();
72+
73+
foreach(var partition in partitions)
74+
{
75+
//Retrieve the partition information
76+
Int64RangePartitionInformation partitionInformation = (Int64RangePartitionInformation)partition.PartitionInformation; //Actors are restricted to the uniform Int64 scheme per https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-actors-introduction#distribution-and-failover
77+
IActorService actorServiceProxy = ActorServiceProxy.Create(serviceName, partitionInformation.LowKey);
78+
79+
ContinuationToken? continuationToken = null;
80+
81+
do
82+
{
83+
var page = await actorServiceProxy.GetActorsAsync(continuationToken, cancellationToken);
84+
actorIds.AddRange(page.Items.Select(actor => actor.ActorId.GetGuidId());
85+
continuationToken = page.ContinuationToken;
86+
} while (continuationToken != null);
87+
}
88+
89+
return actorIds;
90+
```
5691

5792

5893
## Next steps

articles/service-fabric/service-fabric-reliable-services-notifications.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Common reasons for using notifications are:
1818
* Building materialized views, such as secondary indexes or aggregated filtered views of the replica's state. An example is a sorted index of all keys in Reliable Dictionary.
1919
* Sending monitoring data, such as the number of users added in the last hour.
2020

21-
Notifications are fired as part of applying operations.
22-
Because of that, notifications should be handled as fast as possible, and synchronous events shouldn't include any expensive operations.
21+
Notifications are fired as a part of applying operations. On a primary replica, operations are applied after quorum acknowledgment as a part of `transaction.CommitAsync()` or `this.StateManager.GetOrAddAsync()`. On secondary replicas, operations are applied at replication queue data processing. Because of that, notifications should be handled as fast as possible, and synchronous events shouldn't include any expensive operations. Otherwise, it could negatively impact transaction processing time as well as replica build-ups.
22+
2323

2424
## Reliable State Manager notifications
2525
Reliable State Manager provides notifications for the following events:
@@ -212,7 +212,7 @@ Here are some things to keep in mind:
212212
* Because notifications are fired as part of the applying operations, clients see only notifications for locally committed operations. And because operations are guaranteed only to be locally committed (in other words, logged), they might or might not be undone in the future.
213213
* On the redo path, a single notification is fired for each applied operation. This means that if transaction T1 includes Create(X), Delete(X), and Create(X), you'll get one notification for the creation of X, one for the deletion, and one for the creation again, in that order.
214214
* For transactions that contain multiple operations, operations are applied in the order in which they were received on the primary replica from the user.
215-
* As part of processing false progress, some operations might be undone. Notifications are raised for such undo operations, rolling the state of the replica back to a stable point. One important difference of undo notifications is that events that have duplicate keys are aggregated. For example, if transaction T1 is being undone, you'll see a single notification to Delete(X).
215+
* As part of processing false progress, some operations might be undone on secondary replicas. Notifications are raised for such undo operations, rolling the state of the replica back to a stable point. One important difference of undo notifications is that events that have duplicate keys are aggregated. For example, if transaction T1 is being undone, you'll see a single notification to Delete(X).
216216

217217
## Next steps
218218
* [Reliable Collections](service-fabric-work-with-reliable-collections.md)

0 commit comments

Comments
 (0)