Azure的斑点租赁不释放后非正常退出? [英] Azure Blob Lease Doesn't Release Upon Ungraceful Exit?

查看:173
本文介绍了Azure的斑点租赁不释放后非正常退出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我preface用以下这个问题:我只使用这个存储模拟器测试(SDK 1.5。)

Let me preface this problem with the following: I've only tested this using the storage emulator. (SDK 1.5.)

使用快速构建控制台应用程序和本地存储模拟器,我创建了一个失败的场景来测试一个blob租赁在非正常退出应用程序的行为。在Azure的量产版本,它会在多个Web角色实例访问单一的BLOB,并通过租赁锁定它的形式。我有Web角色实例失败了,所以我想这将是一个很好的测试场景。

Using a quickly built console app and local storage emulator, I created a fail scenario to test how a blob lease behaves upon the application exiting ungracefully. In the Azure production version, it would be in the form of multiple web role instances accessing the single blob and locking it via leases. I've had web role instances fail out, so I figured this would be a good test scenario.

该应用程序获得一个特定的blob租赁,打一个破发点租约发布之前,我手动终止控制台应用程序。当我重新运行控制台应用程序,并试图获得一个新的租约,我得到的冲突的错误409这种行为甚至表现出相当一段时间内的第一个租赁收购(非正常及出口)之后。

The app acquires the lease on a particular blob, hits a break point before the lease release and I manually kill the console app. When I re-run the console app and try to acquire a new lease, I get the conflict error 409. This behavior is even exhibited quite some time after the first lease acquisition (and ungraceful exit).

我知道,我知道......我应该只是推到云端,看看会发生什么,但我还没有机会呢。

I know, I know... I should just push it out to the cloud and see what happens, but I haven't had the opportunity yet.

这是行为只是古怪的存储模拟器的情况下,或将Azure的行为相同的方式?

Is this behavior simply a case of the wacky storage emulator or will Azure behave the same way?

推荐答案

如果它超过2分钟,这很可能只是模拟器。在2分钟,我希望租期可能无法使用被收购(无需强迫它)。其实我也从来没有在模拟器测试,但它在云中的伟大工程...

If it is more than 2 mins, it is likely just the emulator. Under 2 mins, I would expect the lease might not be available to be acquired (without forcing it). I have actually never tested this in the emulator, but it works great in the cloud...

这篇关于Azure的斑点租赁不释放后非正常退出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆