Skip to content

Commit

Permalink
fix external_bytes column in yezzey_offload_relation_status_internal (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
diPhantxm authored Oct 23, 2024
1 parent d5b995e commit 2c9e0f4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include <vector>

#include "virtual_index.h"
#include "storage_lister.h"
#include "yproxy.h"

#include "io.h"
#include "io_adv.h"
Expand Down Expand Up @@ -149,12 +151,12 @@ std::string make_yezzey_url(const std::string &prefix, int64_t modcount,
int64_t yezzey_virtual_relation_size(std::shared_ptr<IOadv> adv,
int32_t segid) {
try {
// auto lister = StorageLister(adv, GpIdentity.segindex);
auto lister = YProxyLister(adv, segid);
int64_t sz = 0;
// for (auto key : lister.reader_->getKeyList().contents) {
// sz +=
// lister.reader_->bucketReader.constructReaderParams(key).getKeySize();
// }
auto chunks = lister.list_relation_chunks();
for (auto chunk : chunks) {
sz += chunk.chunkSize;
}
/* external reader destruct */
return sz;
} catch (...) {
Expand Down

0 comments on commit 2c9e0f4

Please sign in to comment.