-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Azure Storage Partition Manager V3 (#899)
* update * remove unnecessart pkg * update test * update drain process && test storage connection * update commit * update scaletests pm setting * udpate commit * update commit * Update AzureStorageScaleTests.cs * test UseTablePartitionManager setting * remove typo * change UseTablePartitionManager = true * update null reference * add control queue in AzureOrchestratorService * update commit * Update AzureStorageScaleTests.cs * commit KillThreeWorker tests * update GetControlQueueAsync * update partition table name setting * update log && commits && add new method to check alignment with owned queues and ownership lease * remove typo and sort using * update commit * add tests * update according to commits * change test connection setting * update according to reviews * mark one test disabled for now cause it's flaky * Update DurableTask.AzureStorage.csproj * Update DurableTask.AzureStorage.csproj * reconstruct ReadAndWriteTable method to be more readable * udpate connection string setting * update connection string setting * update test according to commits and update connection string setting * update connection string setting * update logs * update typo * update tests * update catch exceptions and logs * remove typo * update lease balancer and log * remove unused package * update commits * Update AzureStorageScaleTests.cs for commits * update commit * update commits: drain process * update checkownershiplease from void to task * mark test disabledinci * update according to commit * remove test version * Suggested edits for table partition manager (#921) * update shutdown process to avoid race condition * update shutdown process into one loop to avoid race condition * add commit * More suggested edits (#922) * More suggested edits * Sync'd with latest and added additional refactoring * Adding a few corrections to my previous commit * add new method CheckDrainTask to avoid redundant code * update commit * update shutdown wait time && KillLoop * update commit * Update AppLeaseManager.cs Remove unrelated file using change. * update AzureStorage version * update AzureStorage version * update commit for AcquireInterval * update commit for AcquireInterval * update commit --------- Co-authored-by: Chris Gillum <[email protected]>
- Loading branch information
Showing
9 changed files
with
1,867 additions
and
24 deletions.
There are no files selected for viewing
721 changes: 721 additions & 0 deletions
721
Test/DurableTask.AzureStorage.Tests/TestTablePartitionManager.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// Copyright Microsoft Corporation | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ---------------------------------------------------------------------------------- | ||
|
||
#nullable enable | ||
namespace DurableTask.AzureStorage.Partitioning | ||
{ | ||
using System; | ||
using Azure; | ||
using Azure.Data.Tables; | ||
|
||
/// <summary> | ||
/// The partition lease used by the table partition manager. | ||
/// </summary> | ||
public class TableLease : ITableEntity | ||
{ | ||
// Constant partition key value used for all rows in the partition table. The actual value doesn't matter | ||
// as long as all entries use the same partition key value. | ||
internal const string DefaultPartitionKey = ""; | ||
|
||
/// <summary> | ||
/// Required atrribute of Azure.Data.Tables storage entity. It is always set to <see cref="DefaultPartitionKey"/>. | ||
/// </summary> | ||
public string PartitionKey { get; set; } = DefaultPartitionKey; | ||
|
||
/// <summary> | ||
/// The name of the partition/control queue. | ||
/// </summary> | ||
public string? RowKey { get; set; } | ||
|
||
/// <summary> | ||
/// The current owner of this lease. | ||
/// </summary> | ||
public string? CurrentOwner { get; set; } | ||
|
||
/// <summary> | ||
/// The name of the worker stealing this lease. It's null when no worker is actively stealing it. | ||
/// </summary> | ||
public string? NextOwner { get; set; } | ||
|
||
/// <summary> | ||
/// The timestamp at which the partition was originally acquired by this worker. | ||
/// </summary> | ||
public DateTime? OwnedSince { get; set; } | ||
|
||
/// <summary> | ||
/// The timestamp at which the partition was last renewed. | ||
/// </summary> | ||
public DateTime? LastRenewal { get; set; } | ||
|
||
/// <summary> | ||
/// The timestamp at which the partition lease expires. | ||
/// </summary> | ||
public DateTime? ExpiresAt { get; set; } | ||
|
||
/// <summary> | ||
/// True if the partition is being drained; False otherwise. | ||
/// </summary> | ||
public bool IsDraining { get; set; } = false; | ||
|
||
/// <summary> | ||
/// Required atrribute of Azure.Data.Tables storage entity. Not used. | ||
/// </summary> | ||
public DateTimeOffset? Timestamp { get; set; } | ||
|
||
/// <summary> | ||
/// Unique identifier used to version entities and ensure concurrency safety in Azure.Data.Tables. | ||
/// </summary> | ||
public ETag ETag { get; set; } | ||
} | ||
} |
Oops, something went wrong.