Skip to content
Snippets Groups Projects
  1. May 22, 2017
  2. May 19, 2017
  3. May 18, 2017
  4. May 17, 2017
    • Vladimir Davydov's avatar
      vinyl: allow optional keys in vylog · ea0d6471
      Vladimir Davydov authored
      Currently, only keys from vy_log_key_mask[type] may be present in a
      record of the given type. Extra keys will result in an error. In
      order to rework space truncate, we will have to add a new key for
      VY_LOG_CREATE_INDEX record (space_version). To be able to start from
      vylog generated by an older version, we need to allow extra keys. So
      this patch deletes vy_log_key_mask[] and makes vy_log_record_encode()
      encode only those keys whose value is different from the default one
      (similarly to request_encode()). Checking for mandatory keys is now up
      to vy_recovery_process_record() (currently there's the only that needs
      to be checked - VY_LOG_KEY_DEF)
      ea0d6471
    • Vladimir Davydov's avatar
      vinyl: don't use data left from previous vylog records · cd4ed98b
      Vladimir Davydov authored
      vy_recovery_iterate() doesn't clean vy_log_record before proceeding to
      the next log entry. As a result, a run record passed to the callback by
      vy_recovery_iterate() contains extra info left from the index this run
      is for: index_lsn, index_id and space_id. We use this in gc and backup
      callbacks to format file name. The problem is vy_recovery_iterate() is
      also used internally for log rotation. Including extra keys in records
      doesn't result in writing them to the log file on rotation, because per
      each record type we have a mask of keys corresponding to the record
      (vy_log_key_mask). In order to allow optional keys in vylog, the
      following patch will change the meaning of the mask so that it only
      contains mandatory keys, while a key will be written to the log only if
      its value differs from the default (similarly to request_encode). Thus,
      to avoid writing keys not relevant to a record type we need to clean
      vy_log_record within vy_recovery_iterate() before jumping to the next
      record. So this patch weans gc and backup from exploiting this feature -
      let them save index_id and space_id in the context, as we do on
      replication and recovery.
      cd4ed98b
    • Vladislav Shpilevoy's avatar
      Implement info_append_double · 24707c0c
      Vladislav Shpilevoy authored
      Info_append_double is needed to print vinyl index.info.bloom_fpr later.
      24707c0c
    • Vladimir Davydov's avatar
      vinyl: zap vy_index::path · 124bac9a
      Vladimir Davydov authored
      It was helpful when a vinyl index could have a custom path. Currently,
      it's forbidden, so we can format index path in place.
      124bac9a
    • Vladimir Davydov's avatar
      vinyl: zap vy_index::name · ae80dbc1
      Vladimir Davydov authored
      We can format it in place when needed.
      ae80dbc1
    • Vladimir Davydov's avatar
      vinyl: introduce quota timeout · 70a610d1
      Vladimir Davydov authored
      There must be a reasonable timeout on quota wait time, otherwise we risk
      throttling a client forever, e.g. in case of a disk error. This patch
      introduces quota timeout. The timeout is configured via vinyl_timeout
      configuration option and set to 60 seconds by default.
      
      Closes #2014
      70a610d1
    • Vladimir Davydov's avatar
      vinyl: split quota callback function · 883f16a7
      Vladimir Davydov authored
      Use separate function for each kind of callback. The next patch will add
      an argument and a return value to the throttle callback, so it isn't apt
      anymore to use the only callback to handle all cases.
      883f16a7
    • Vladimir Davydov's avatar
      vinyl: reserve quota before using memory · c8ea5fc7
      Vladimir Davydov authored
      Currently, we reserve quota after allocating memory, which can result in
      exceeding the memory limit, e.g. after the following script
      
          box.cfg{vinyl_memory = 1024 * 1024}
          s = box.schema.space.create('test', {engine = 'vinyl'})
          s:create_index('pk')
          pad = string.rep('x', 2 * box.cfg.vinyl_memory / 3)
          s:auto_increment{pad}
          s:auto_increment{pad}
      
      is done, box.info.vinyl().memory.used reports that 1447330 bytes are
      allocated. Fix this by reserving quota before allocation. A test is
      added later in the series.
      c8ea5fc7
    • Vladimir Davydov's avatar
      vinyl: add test checking that we don't exceed quota on recovery · c06fc47a
      Vladimir Davydov authored
      Vinyl dump is disabled during local recovery from WAL. This is OK,
      because we shouldn't exceed the quota provided we don't replay
      statements that were dumped to disk before restart. Check that.
      c06fc47a
  5. May 16, 2017
  6. May 15, 2017
    • Vladimir Davydov's avatar
      vinyl: fix index->stmt_count incremented twice on upsert · 13dd8a41
      Vladimir Davydov authored
      Although upsert optimizers (both sync and background) replace the
      last UPSERT with a REPLACE and do not insert new statements, they
      use vy_index_insert_stmt(), which increments index->stmt_count.
      As a result, index->stmt_count is incremented twice.
      
      Closes #2421
      13dd8a41
  7. May 12, 2017
Loading