Project

General

Profile

Actions

Bug #78776

closed
AK AK

Write v2 compressed attempt that ends with uncompressed write can cause data loss

Bug #78776: Write v2 compressed attempt that ends with uncompressed write can cause data loss

Added by Adam Kupczyk 4 months ago. Updated 17 days ago.

Status:
Backporting
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

100%

Source:
Backport:
umbrella, tentacle, squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v22.0.0-278-gd9ff21a96d
Released In:
Upkeep Timestamp:
2026-11-02T07:41:14+00:00

Description

The problem surfaces when specific onode sharding meets compressed v2 write.

Initial sharding

  //00000~20000 blob A  shard a
  //20000~10000 blob B1 shard a
  //30000~10000 blob B2 shard b
  //40000~20000 blob C  shard b
  //60000~20000 blob D  shard b
  //80000~10000 blob E1 shard b
  //90000~10000 blob E2 shard c
  //a0000~20000 blob F  shard c
  //c0000~20000 blob G  shard c
  //e0000~20000 blob H  shard c

Now we write random uncompressible data to 0x50000~0x20000.
Due to compression lookaround logic the write becomes 0x30000~0x60000.

  //00000~20000 blob A  shard a
  //20000~10000 blob B  shard a
  //30000~10000 blob X1 shard b <- new data
  //40000~20000 blob X2 shard b <- new data
  //60000~20000 blob X3 shard b <- new data
  //80000~10000 blob X4 shard b <- new data
  //90000~10000 blob E2 shard c
  //a0000~20000 blob F  shard c
  //c0000~20000 blob G  shard c
  //e0000~20000 blob H  shard c

But extents are getting merged:

  //00000~20000 blob A  shard a
  //20000~20000 blob B  shard a <- merged extent, includes new data, but modification not written
  //30000~10000                 <- missing
  //40000~20000 blob X2 shard b <- new data
  //60000~20000 blob X3 shard b <- new data
  //80000~10000 blob X4 shard b <- new data
  //90000~10000 blob E2 shard c
  //a0000~20000 blob F  shard c
  //c0000~20000 blob G  shard c
  //e0000~20000 blob H  shard c

So after onode gets evicted from cache and loaded again:

  //00000~20000 blob A  shard a
  //20000~10000 blob B  shard a
  //30000~10000                 <- missing!
  //40000~20000 blob X2 shard b
  //60000~20000 blob X3 shard b
  //80000~10000 blob X4 shard b
  //90000~10000 blob E2 shard c
  //a0000~20000 blob F  shard c
  //c0000~20000 blob G  shard c
  //e0000~20000 blob H  shard c


Related issues 4 (3 open — 1 closed)

Related to bluestore - Bug #81934: src/os/bluestore/bluestore_types.cc: FAILED ceph_assert(!end_it->is_valid())DuplicateAdam Kupczyk

Actions
Copied to bluestore - Backport #82528: umbrella: Write v2 compressed attempt that ends with uncompressed write can cause data lossIn ProgressJaya Prakash

Actions
Copied to bluestore - Backport #82529: squid: Write v2 compressed attempt that ends with uncompressed write can cause data lossNewJaya Prakash

Actions
Copied to bluestore - Backport #82530: tentacle: Write v2 compressed attempt that ends with uncompressed write can cause data lossIn ProgressJaya Prakash

Actions

JP Updated by Jaya Prakash about 1 month ago Actions #1

  • Related to Bug #81934: src/os/bluestore/bluestore_types.cc: FAILED ceph_assert(!end_it->is_valid()) added

JP Updated by Jaya Prakash about 1 month ago Actions #2

  • Subtask #81934 added

JP Updated by Jaya Prakash about 1 month ago Actions #3

  • Subtask deleted (#81934)

JP Updated by Jaya Prakash about 1 month ago Actions #4

  • Related to Bug #81934: src/os/bluestore/bluestore_types.cc: FAILED ceph_assert(!end_it->is_valid()) added

UB Updated by Upkeep Bot about 1 month ago Actions #5

  • Copied to Backport #82528: umbrella: Write v2 compressed attempt that ends with uncompressed write can cause data loss added

UB Updated by Upkeep Bot about 1 month ago Actions #6

  • Copied to Backport #82529: squid: Write v2 compressed attempt that ends with uncompressed write can cause data loss added

UB Updated by Upkeep Bot about 1 month ago Actions #7

  • Copied to Backport #82530: tentacle: Write v2 compressed attempt that ends with uncompressed write can cause data loss added

UB Updated by Upkeep Bot about 1 month ago Actions #8

  • Status changed from Fix Under Review to Backporting
  • Merge Commit set to d9ff21a96dcea39b56125cae5f6dcc8dfaaf8f7a
  • Fixed In set to v22.0.0-278-gd9ff21a96d
  • Upkeep Timestamp set to 2026-11-02T07:41:14+00:00

JP Updated by Jaya Prakash 17 days ago Actions #9

  • Assignee set to Jaya Prakash

JP Updated by Jaya Prakash 17 days ago Actions #10

  • Assignee changed from Jaya Prakash to Adam Kupczyk
Actions

Also available in: PDF Atom