Skip to content

Blobstor may "lose" objects on config changes #1707

@carpawell

Description

@carpawell

Context

blobovnicza stores objects in its buckets according to object sizes: it chooses the minimum number (the power of 2) that satisfies the object limit. It creates buckets for objects starting from 32<<10 = 32kb, e.g. if the size limit is 100kb, tree buckets gonna be created: [0:32kb), [32kb:64kb), [64kb:128kb). That buckets will be used for storing and searching objects. Searching will try to iterate buckets according to the current configuration of the blobovnicza.

Problem

Consider situation:

  1. A Node was configured to store objects with size<=N, N%2==0
  2. It gets objects with N/2 < size <= N and stores them in the last of the supported buckets
  3. The node goes offline
  4. Its config changes and now it gonna store "small" objects only if their size<=N/2
  5. It gets Get with the object from 2. and could not return it since it does not know about the last bucket it has

Problems:

  1. Current implementation could not return object
  2. Object is stored but does not satisfy object placement (seems like such objects should be migrated to the FSTree with corresponding metabase changes)

Ideas

  1. Could be solved by just iterating all the buckets it has (but somehow logic with the defined bucket names were implemented, mb it has some nuances, /cc @cthulhu-rider)
  2. We could migrate or not migrate objects. If some objects are expected to be stored in a bolt base it could be unexpected to find them in FSTree after the config change (/cc @realloc)

Metadata

Metadata

Assignees

Labels

U0Needs to be resolved immediatelybugSomething isn't workingdiscussionOpen discussion of some problemneofs-storageStorage node application issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions