Project

General

Profile

Actions

Bug #46581

closed

parent cache does not properly handle DNE objects

Added by Mykola Golub almost 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The ceph-immutable-object-cache does not have a special handling for non existent objects, storing them as empty objects and returning an empty result.

When used with rbd it causes issue for layered (clone of clone) images, a read for which may return an empty result instead of trying the parent.

Steps to reproduce:

1) Prepare double clone:

  % rbd create test1 -s 1M
  % rbd bench --io-type write --io-size 1M --io-total 1M test1
  % rbd snap create test1@snap
  % rbd snap protect test1@snap
  % rbd clone test1@snap test2
  % rbd snap create test2@snap
  % rbd snap protect test2@snap
  % rbd clone test2@snap test3

2) Configure immutable_object_cache_path and
   immutable_object_cache_sock in ceph.conf and start the cache controller:

  % ceph-immutable-object-cache --id admin

3) Read the image:

  % rbd export test3 - | xxd| tail -1
  Exporting image: 100% complete...done.
  000ffff0: 6767 6767 6767 6767 6767 6767 6767 6767  gggggggggggggggg
  % rbd export --rbd_parent_cache_enabled=true --rbd_plugins=parent_cache test3 - | xxd| tail -1
  Exporting image: 100% complete...done.
  000ffff0: 6767 6767 6767 6767 6767 6767 6767 6767  gggggggggggggggg
  % rbd export --rbd_parent_cache_enabled=true --rbd_plugins=parent_cache test3 - | xxd| tail -1
  Exporting image: 100% complete...done.
  000ffff0: 0000 0000 0000 0000 0000 0000 0000 0000  ................

Note, the first read, when using the parent cache returns the correct result, because there is no object in the cache yet. This reads triggers the object promotion (empty file is created) and the next reads return incorrect empty result.

The issue was incidentally detected when running TestDeepCopy.Clone with parent_cache enabled: when comparing the source and the destination images the read from the source image was correct but triggered the empty object promotion resulted in incorrect read from the destination image.


Related issues 1 (0 open1 closed)

Copied to rbd - Backport #46791: octopus: parent cache does not properly handle DNE objectsResolvedJason DillamanActions
Actions #1

Updated by Mykola Golub almost 4 years ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 36159
Actions #2

Updated by Jason Dillaman over 3 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #3

Updated by Nathan Cutler over 3 years ago

  • Copied to Backport #46791: octopus: parent cache does not properly handle DNE objects added
Actions #4

Updated by Nathan Cutler over 3 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF