Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hypermodeinc/badger
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9d7b751e85c981d34e6351520919f5c0547c1379
Choose a base ref
...
head repository: hypermodeinc/badger
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 398445a29fa79e38366ae4f29da1ba133778ff25
Choose a head ref
  • 10 commits
  • 20 files changed
  • 5 contributors

Commits on Aug 10, 2019

  1. Prevent unnecessary safecopy in iterator parseKV (#971)

    The previous implementation of parseKV would copy over the value slice
    every time we iterate, which is not necessary. The value slice should be
    copied only when we return the result of point lookups. The proposed patch
    removes safeCopy call from the iterator.
    Ibrahim Jarif authored Aug 10, 2019
    Copy the full SHA
    74ed6da View commit details

Commits on Aug 14, 2019

  1. Performance Improvements to block iterator (#977)

    This commit reduces the complexity in the block iterator. The amount of code is reduced 
    by about **50%**. The iterations and point look ups are faster by **40%** and **20%** 
    respectively. (The point look ups are done via `seek(...)` API)
    
    Benchmark results
    ```
    name             old time/op  new time/op  delta
    Read-16           144ms ± 1%    82ms ± 1%  -42.81%  (p=0.008 n=5+5)
    ReadAndBuild-16   876ms ± 1%   819ms ± 3%   -6.56%  (p=0.008 n=5+5)
    ReadMerged-16     962ms ± 1%   868ms ± 1%   -9.72%  (p=0.008 n=5+5)
    RandomRead-16    2.44µs ± 1%  1.93µs ± 1%  -21.13%  (p=0.008 n=5+5)
    
    ```
    
    Inspired by pingcap@0b03ef0
    Ibrahim Jarif authored Aug 14, 2019
    Copy the full SHA
    b56a0dc View commit details
  2. In the bank tool, do not print all bank transfers by default. (#982)

    The bank tool is currently printing each bank transfer by default, which
    results in a lot of output, specially when running the test for a while.
    This PR makes this optional and controllable by a --verbose flag.
    martinmr authored Aug 14, 2019
    Copy the full SHA
    31395c2 View commit details

Commits on Aug 19, 2019

  1. Lock log file before munmap (#949)

    As per the comments in the struct, the logFile should be write-locked
    when closing or unmapping. There is a potential race condition where
    an iterator could be reading a value and be holding the RLock but the
    memory will be unmapped via a call to deleteLogFile(lf *logFile) .
    connorgorman authored and Ibrahim Jarif committed Aug 19, 2019
    Copy the full SHA
    7a7dd17 View commit details
  2. Copy the full SHA
    6a7fb6c View commit details

Commits on Aug 21, 2019

  1. Fix boundaries on GC batch size (#987)

    In the value log rewrite, the check to determine if the commit was
    going to be within transaction limits is checked only if the value
    would be `>` than the max count. However, the check within the
    transaction is:
    
    ```
       if count >= db.opt.maxBatchCount || size >= db.opt.maxBatchSize {
            return nil, ErrTxnTooBig
        }
    ```
    connorgorman authored and Ibrahim Jarif committed Aug 21, 2019
    Copy the full SHA
    9725af7 View commit details

Commits on Aug 22, 2019

  1. Use standard proto functions for Marshal/Unmarshal and Size (#994)

    Some of the code interacting with protobufs was calling functions
    emitted by the proto compiler directly on the protobuf structs;
    `proto_obj.Marshal`, `proto_obj.Unmarshal`, `proto_obj.Size`.
    
    These functions are no longer emitted by the upstream protobuf
    compiler, only by gogo/protobuf.
    Users who don't use the pregenerated `pb.pb.go`, but instead
    recompile the proto files using the upstream compiler will encounter
    compilations failures.  (I hit this because that's the default mode
    for importing go projects using bazel and gazelle).
    
    These commits change any code that was using these functions to use
    the standard proto library functions: `proto.Marshal`,
    `proto.Unmarshal`, and `proto.Size`.
    
    These changes shouldn't cause any performance effects --- the
    implementations of each of these functions call out, directly or
    indirectly, to the directly-attached functions, if they exist.
    ahmedtd authored and Ibrahim Jarif committed Aug 22, 2019
    Copy the full SHA
    bd6cd59 View commit details
  2. Fix table.Smallest/Biggest and iterator Prefix bug (#997)

    The pick table compares the smallest and biggest key of each table
    against the iteratorOptions.Prefix. The smallest and biggest key contain
    timestamps while the prefix does not contains timestamp. So pickTable
    would not return the correct tables.
    
    For example
    Table has Smallest [0 255 255... ] and prefix [0, 0, 1], the comparison
    of these two values would return true implying that the smallest is
    greater than the prefix which is incorrect because prefix doesn't
    contains a timestamp and smallest does.
    
    With this commit, we compare the smallest/biggest keys without
    timestamps to the opt.Prefix.
    
    See #992 for more details.
    Ibrahim Jarif authored Aug 22, 2019
    Copy the full SHA
    5f64ecf View commit details

Commits on Aug 23, 2019

  1. Binary search based table picker (#983)

    Use binary search to pick tables instead of simple looping.
    This seems to improve the performance of key iterator 
    creation close to seek.
    
    Signed-off-by: பாலாஜி <rbalajis25@gmail.com>
    balaji authored Aug 23, 2019
    Copy the full SHA
    2090032 View commit details

Commits on Aug 27, 2019

  1. Fix deadlock when flushing discard stats. (#976)

    * In updateDiscardStats the vlog.lfDiscardStats lock was acquired
      twice: once in updateDiscardStats and then a second time when
      calling flushDiscardStats. Now, we first release the lock before
      calling flushDiscardStats.
    
    * Don't return an error if writes are blocked for discard
      stats.
    
    * Add tests and regression tests.
    
    Signed-off-by: பாலாஜி ஜின்னா <balaji@dgraph.io>
    balaji authored and danielmai committed Aug 27, 2019
    Copy the full SHA
    398445a View commit details
Loading