小编Mat*_*erg的帖子

Windows Azure表存储行大小限制小于规定的1MB

我已经使用这些来源对表存储及其大小限制,开销等进行了大量研究:

使用这些信息,我写了一些代码来有效地存储多个属性的二进制数据,计算任何行和属性开销,并保持64KB属性限制和1MB行限制.

不幸的是它只是不起作用.作为一个例子,存储大约0.5MB返回400 Bad Request,说明实体太大 - 我不明白为什么它会被赋予1MB行大小限制.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <code>EntityTooLarge</code>
  <message xml:lang="en-GB">The entity is larger than allowed by the Table Service.</message>
</error>
Run Code Online (Sandbox Code Playgroud)

我一直在使用的代码是相当简单的,但我可能在估算开销时犯了错误 - 但我怀疑它会被100%的数据大小所取消.

class Program
{
    static void Main(string[] args)
    {
        var client = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudTableClient();
        var table = client.GetTableReference("sometable");
        table.CreateIfNotExists();

        const int rowOverhead = 4;
        const int maxRowSize = 1024 * 1024; // 1MB row size limit
        const int maxProperties = 252; // 255 less 3 system properties
        const int maxPropertySize = …
Run Code Online (Sandbox Code Playgroud)

azure azure-table-storage

5
推荐指数
1
解决办法
6658
查看次数

标签 统计

azure ×1

azure-table-storage ×1