{"action":"opened","issue":{"url":"https://api.github.com/repos/Azure/service-fabric-issues/issues/105","repository_url":"https://api.github.com/repos/Azure/service-fabric-issues","labels_url":"https://api.github.com/repos/Azure/service-fabric-issues/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/Azure/service-fabric-issues/issues/105/comments","events_url":"https://api.github.com/repos/Azure/service-fabric-issues/issues/105/events","html_url":"https://github.com/Azure/service-fabric-issues/issues/105","id":195611027,"number":105,"title":"Add PartitionRepresentativeKey to ServicePartitionInformation","user":{"login":"mkosieradzki","id":10385115,"avatar_url":"https://avatars.githubusercontent.com/u/10385115?v=3","gravatar_id":"","url":"https://api.github.com/users/mkosieradzki","html_url":"https://github.com/mkosieradzki","followers_url":"https://api.github.com/users/mkosieradzki/followers","following_url":"https://api.github.com/users/mkosieradzki/following{/other_user}","gists_url":"https://api.github.com/users/mkosieradzki/gists{/gist_id}","starred_url":"https://api.github.com/users/mkosieradzki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkosieradzki/subscriptions","organizations_url":"https://api.github.com/users/mkosieradzki/orgs","repos_url":"https://api.github.com/users/mkosieradzki/repos","events_url":"https://api.github.com/users/mkosieradzki/events{/privacy}","received_events_url":"https://api.github.com/users/mkosieradzki/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-14T18:39:18Z","updated_at":"2016-12-14T18:39:18Z","closed_at":null,"body":"ServicePartitionInformation generic class does not contain **directly** any information allowing to determine a representative key for backup/restore/data loss scenarios. As we know (and according to the backup documentation) PartitionId changes after service is recreated so you cannot depend on this value for backup/restore.\r\n\r\nMy suggestion would be to add PartitionRepresentativeKey (or CanonicalKey) as string or object to the ServicePartitionInformation base class - it might be through an extension method to help identify partition for backup/restore purposes.\r\n\r\nIf someone complies to the guideline of not modifying partitioning scheme this might be a straightforward way to deal with backup/restore.\r\n\r\n\r\nAlternatively please update documentation:\r\nhttps://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-backup-restore\r\n\r\n\"One caveat is that the partition ID may have now changed, since the runtime creates partition IDs dynamically. Thus, the service needs to store the appropriate partition information and service name to identify the correct latest backup to restore from for each partition.\"\r\n\r\nand add suggestion with a code snippet to upcast to get a Partition Representative Key: for example((Int64RangePartitionInformation)Partition.PartitionInfo).LowKey"}}
{"actor":{"display_login":"mkosieradzki"}}