@@ -95,7 +95,7 @@ int OSDriver::get_keys(
9595 const std::set<std::string> &keys,
9696 std::map<std::string, ceph::buffer::list> *out)
9797{
98- CRIMSON_DEBUG (" OSDriver::{}:{} " , __func__, __LINE__ );
98+ CRIMSON_DEBUG (" OSDriver::{}" , __func__);
9999 using crimson::os::FuturizedStore;
100100 return interruptor::green_get (os->omap_get_values (
101101 ch, hoid, keys
@@ -107,54 +107,54 @@ int OSDriver::get_keys(
107107 assert (e.value () > 0 );
108108 return -e.value ();
109109 }))); // this requires seastar::thread
110- CRIMSON_DEBUG (" OSDriver::{}:{}" , __func__, __LINE__);
111110}
112111
113112int OSDriver::get_next (
114113 const std::string &key,
115114 std::pair<std::string, ceph::buffer::list> *next)
116115{
117- CRIMSON_DEBUG (" OSDriver::{}: {}" , __func__, __LINE__ );
116+ CRIMSON_DEBUG (" OSDriver::{} key {}" , __func__, key );
118117 using crimson::os::FuturizedStore;
119118 return interruptor::green_get (os->omap_get_values (
120119 ch, hoid, key
121120 ).safe_then_unpack ([&key, next] (bool , FuturizedStore::Shard::omap_values_t && vals) {
122- CRIMSON_DEBUG (" OSDriver::{}:{}" , " get_next" , __LINE__);
123- if (auto nit = std::begin (vals); nit == std::end (vals)) {
124- CRIMSON_DEBUG (" OSDriver::{}:{}" , " get_next" , __LINE__);
121+ CRIMSON_DEBUG (" OSDriver::get_next key {} got omap values" , key);
122+ if (auto nit = std::begin (vals);
123+ nit == std::end (vals) || !SnapMapper::is_mapping (nit->first )) {
124+ CRIMSON_DEBUG (" OSDriver::get_next key {} no more values" , key);
125125 return -ENOENT;
126126 } else {
127- CRIMSON_DEBUG (" OSDriver::{}:{} " , " get_next " , __LINE__ );
127+ CRIMSON_DEBUG (" OSDriver::get_next returning next: {} , " , nit-> first );
128128 assert (nit->first > key);
129129 *next = *nit;
130130 return 0 ;
131131 }
132132 }, FuturizedStore::Shard::read_errorator::all_same_way ([] {
133- CRIMSON_DEBUG (" OSDriver::{}:{} " , " get_next" , __LINE__ );
133+ CRIMSON_DEBUG (" OSDriver::get_next saw error returning EINVAL " );
134134 return -EINVAL;
135135 }))); // this requires seastar::thread
136- CRIMSON_DEBUG (" OSDriver::{}:{}" , __func__, __LINE__);
137136}
138137
139138int OSDriver::get_next_or_current (
140139 const std::string &key,
141140 std::pair<std::string, ceph::buffer::list> *next_or_current)
142141{
143- CRIMSON_DEBUG (" OSDriver::{}: {}" , __func__, __LINE__ );
142+ CRIMSON_DEBUG (" OSDriver::{} key {}" , __func__, key );
144143 using crimson::os::FuturizedStore;
145144 // let's try to get current first
146145 return interruptor::green_get (os->omap_get_values (
147146 ch, hoid, FuturizedStore::Shard::omap_keys_t {key}
148147 ).safe_then ([&key, next_or_current] (FuturizedStore::Shard::omap_values_t && vals) {
148+ CRIMSON_DEBUG (" OSDriver::get_next_or_current returning {}" , key);
149149 assert (vals.size () == 1 );
150150 *next_or_current = std::make_pair (key, std::move (vals.begin ()->second ));
151151 return 0 ;
152152 }, FuturizedStore::Shard::read_errorator::all_same_way (
153153 [next_or_current, &key, this ] {
154+ CRIMSON_DEBUG (" OSDriver::get_next_or_current no current, try next {}" , key);
154155 // no current, try next
155156 return get_next (key, next_or_current);
156157 }))); // this requires seastar::thread
157- CRIMSON_DEBUG (" OSDriver::{}:{}" , __func__, __LINE__);
158158}
159159#else
160160int OSDriver::get_keys (
0 commit comments