【问题标题】:Seaweedfs Delete file succeds but existing filer still holds itSeaweedfs 删除文件成功,但现有文件管理器仍保留它
【发布时间】:2020-12-22 08:34:55
【问题描述】:

我们使用 seaweedfs 1.78
当我使用 grpc 时,通过 filer 删除文件。

curl -X DELETE http://filer1:9889/dataset/qiantao/1.txt

返回成功。
因为我有 10 个文件管理器。删除后!

curl -H "Accept: application/json"   "http://filer2:9889/dataset/qiantao/?pretty=y"  |grep qiantao |grep txt 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15723    0 15723    0     0  1917k      0 --:--:-- --:--:-- --:--:-- 2193k
      "FullPath": "/dataset/qiantao/1.txt",

如果我启动一个新的文件管理器。
无法得到/dataset/qiantao/1.txt;看起来很完美!!!!
但在现有的文件管理器中。
Filer 在下方获取文件信息。

curl -H "Accept: application/json"   "http://filer1:9889/dataset/qiantao/?pretty=y&limit=1"
{
  "Path": "/dataset/qiantao",
  "Entries": [
    {
      "FullPath": "/dataset/qiantao/1.txt",
      "Mtime": "2020-12-07T11:15:59+08:00",
      "Crtime": "2020-12-07T11:15:59+08:00",
      "Mode": 432,
      "Uid": 0,
      "Gid": 0,
      "Mime": "text/plain",
      "Replication": "010",
      "Collection": "",
      "TtlSec": 0,
      "UserName": "",
      "GroupNames": null,
      "SymlinkTarget": "",
      "Md5": null,
      "Extended": null,
      "chunks": [
        {
          "file_id": "4328,587fb084df9f9dbf",
          "size": 2,
          "mtime": 1607310959158810676,
          "e_tag": "c7c83966",
          "fid": {
            "volume_id": 4328,
            "file_key": 1484763268,
            "cookie": 3751779775
          }
        }
      ]
    }
  ],
  "Limit": 1,
  "LastFileName": "1.txt",
  "ShouldDisplayLoadMore": true

在下方获取音量信息。

    {
      "Id": 4328,
      "Size": 31492542356,
      "ReplicaPlacement": {
        "SameRackCount": 0,
        "DiffRackCount": 1,
        "DiffDataCenterCount": 0
      },
      "Ttl": {
        "Count": 0,
        "Unit": 0
      },
      "Collection": "",
      "Version": 3,
      "FileCount": 111030,
      "DeleteCount": 709,
      "DeletedByteCount": 1628822733,
      "ReadOnly": false,
      "CompactRevision": 0,
      "ModifiedAtSecond": 0,
      "RemoteStorageName": "",
      "RemoteStorageKey": ""
    },

所以从卷服务器下载4328.idx。并使用see_idx 查找它。

./see_idx -dir /Users/qiantao/Documents/seaweedfs -volumeId=4328 -v=4 |grep 587fb084

key:587fb084 offset:2802901546 size:57
key:587fb084 offset:3937021600 size:4294967295

key:587fb084 好像被新覆盖了?

那么我该如何解决这个问题,让它看起来正常呢?

【问题讨论】:

    标签: go seaweedfs


    【解决方案1】:

    4294967295是一个墓碑,标志着该条目已被删除。

    【讨论】:

    • 但还是通过api从exist filer查询。 @chrislusf
    • 根据您提供的信息无法判断。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-23
    • 1970-01-01
    • 2018-10-01
    • 2020-04-16
    相关资源
    最近更新 更多