{"action":"opened","issue":{"url":"https://api.github.com/repos/StackExchange/StackExchange.Redis/issues/285","labels_url":"https://api.github.com/repos/StackExchange/StackExchange.Redis/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/StackExchange/StackExchange.Redis/issues/285/comments","events_url":"https://api.github.com/repos/StackExchange/StackExchange.Redis/issues/285/events","html_url":"https://github.com/StackExchange/StackExchange.Redis/issues/285","id":108890515,"number":285,"title":"Transaction with LockReleaseAsync does not work properly (Nested transactions are not supported exception)","user":{"login":"Nigrimmist","id":1579535,"avatar_url":"https://avatars.githubusercontent.com/u/1579535?v=3","gravatar_id":"","url":"https://api.github.com/users/Nigrimmist","html_url":"https://github.com/Nigrimmist","followers_url":"https://api.github.com/users/Nigrimmist/followers","following_url":"https://api.github.com/users/Nigrimmist/following{/other_user}","gists_url":"https://api.github.com/users/Nigrimmist/gists{/gist_id}","starred_url":"https://api.github.com/users/Nigrimmist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nigrimmist/subscriptions","organizations_url":"https://api.github.com/users/Nigrimmist/orgs","repos_url":"https://api.github.com/users/Nigrimmist/repos","events_url":"https://api.github.com/users/Nigrimmist/events{/privacy}","received_events_url":"https://api.github.com/users/Nigrimmist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-29T15:08:36Z","updated_at":"2015-09-29T15:08:36Z","closed_at":null,"body":"Hi guys. My case is : use transaction for batching lock/unlock and others commands. Part of real  code : \r\n\r\n      public static T test<T>(string key, Func<T> retrieveDataFunc, TimeSpan absoluteTimeExpiration, Func<T, bool> modifyEntityFunc,\r\n           TimeSpan? lockTimeout = null) where T : class\r\n        {\r\n\r\n            var cache = Connection.GetDatabase();\r\n            var tran = cache.CreateTransaction();\r\n            var lockToken = Guid.NewGuid().ToString();\r\n            var lockName = key + \"_lock\";\r\n            \r\n            T tResult = null;\r\n            try\r\n            {\r\n                tran.LockTakeAsync(lockName, lockToken, lockTimeout ?? TimeSpan.FromSeconds(10));\r\n                var result = tran.StringGetAsync(key);\r\n                tran.Execute();\r\n                \r\n                tran.StringSetAsync(key, \"test\", absoluteTimeExpiration);\r\n                \r\n            }\r\n            finally\r\n            {\r\n                //there is \"Nested transactions are not supported\" exception\r\n                cache.LockReleaseAsync(lockName, lockToken);\r\n                tran.ExecuteAsync();\r\n            }\r\n\r\n\r\n            return tResult;\r\n        }\r\n\r\nSeems like i can't use outer transaction with LockReleaseAsync method. Thanks."}}