encode(data_size, bl);
bl.claim_append(bl_data);
- CLS_LOG(10, "INFO: queue_enqueue(): Total size to be written is %u and data size is %u\n", bl.length(), bl_data.length());
+ CLS_LOG(10, "INFO: queue_enqueue(): Total size to be written is %u and data size is %lu\n", bl.length(), data_size);
if (head.tail.offset >= head.front.offset) {
// check if data can fit in the remaining space in queue
}
//If there is leftover data from previous iteration, append new data to leftover data
+ uint64_t entry_start_offset = start_offset - bl.length();
+ CLS_LOG(20, "INFO: queue_list_entries(): Entry start offset accounting for leftover data is %lu\n", entry_start_offset);
bl.claim_append(bl_chunk);
bl_chunk = std::move(bl);
ceph_assert(it.get_off() == index);
//Populate offset if not done in previous iteration
if (! offset_populated) {
- cls_queue_marker marker = {start_offset + index, gen};
+ cls_queue_marker marker = {entry_start_offset + index, gen};
CLS_LOG(5, "INFO: queue_list_entries(): offset: %s\n", marker.to_str().c_str());
entry.marker = marker.to_str();
}
CLS_LOG(10, "INFO: num_ops: %lu and op.max is %lu\n", num_ops, op.max);
if (num_ops == op.max) {
- next_marker = cls_queue_marker{(start_offset + index), gen};
+ next_marker = cls_queue_marker{(entry_start_offset + index), gen};
CLS_LOG(10, "INFO: queue_list_entries(): num_ops is same as op.max, hence breaking out from outer loop with next offset: %lu\n", next_marker.offset);
break;
}