Guest User

Untitled

a guest
Jul 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
  2. index c1c3191..0a98d18 100644
  3. --- a/storage/rocksdb/ha_rocksdb.cc
  4. +++ b/storage/rocksdb/ha_rocksdb.cc
  5. @@ -10308,6 +10308,10 @@ int ha_rocksdb::info(uint flag) {
  6. if (stats.records == 0) {
  7. rdb->GetApproximateSizes(m_pk_descr->get_cf(), &r, 1, &sz,
  8. include_flags);
  9. + fprintf(stderr,
  10. + "AAA: GetApproximateSizes() call #1, value %g\n",
  11. + double(sz)/ROCKSDB_ASSUMED_KEY_VALUE_DISK_SIZE);
  12. +
  13. stats.records+= sz/ROCKSDB_ASSUMED_KEY_VALUE_DISK_SIZE;
  14. stats.data_file_length+= sz;
  15. }
  16. @@ -10326,6 +10330,9 @@ int ha_rocksdb::info(uint flag) {
  17. // cardinality for memtable only indxes will be reported as 0
  18. rdb->GetApproximateMemTableStats(m_pk_descr->get_cf(), r,
  19. &memtableCount, &memtableSize);
  20. + fprintf(stderr,
  21. + "AAA: GetApproximateMemTableStats() call#1 returns %ld \n",
  22. + (long)memtableCount);
  23.  
  24. // Atomically update all of these fields at the same time
  25. if (cachetime > 0) {
  26. @@ -11257,6 +11264,11 @@ ha_rows ha_rocksdb::records_in_range(uint inx, key_range *const min_key,
  27. ret = rows * sz / disk_size;
  28. uint64_t memTableCount;
  29. rdb->GetApproximateMemTableStats(kd.get_cf(), r, &memTableCount, &sz);
  30. +
  31. + fprintf(stderr,
  32. + "AAA: GetApproximateMemTableStats() call#2 returns %ld\n",
  33. + (long)memTableCount);
  34. +
  35. ret += memTableCount;
  36.  
  37. /*
  38. @@ -11408,6 +11420,10 @@ int ha_rocksdb::calculate_stats(const TABLE *const table_arg, THD *const thd,
  39. uint64_t memtableSize;
  40. rdb->GetApproximateMemTableStats(kd.get_cf(), r, &memtableCount,
  41. &memtableSize);
  42. + fprintf(stderr,
  43. + "AAA: GetApproximateMemTableStats() call #3 returns %ld\n",
  44. + (long)memtableCount);
  45. +
  46. if (memtableCount < (uint64_t)stat.m_rows / 10) {
  47. // skip tables that already have enough stats from SST files to reduce
  48. // overhead and avoid degradation of big tables stats by sampling from
Add Comment
Please, Sign In to add comment