1. 18 1月, 2018 6 次提交
  2. 10 1月, 2018 12 次提交
  3. 05 1月, 2018 1 次提交
  4. 05 12月, 2017 7 次提交
  5. 04 12月, 2017 5 次提交
    • A
      Refactoring: improve luaCreateFunction() API. · c85c84be
      antirez 提交于
      The function in its initial form, and after the fixes for the PSYNC2
      bugs, required code duplication in multiple spots. This commit modifies
      it in order to always compute the script name independently, and to
      return the SDS of the SHA of the body: this way it can be used in all
      the places, including for SCRIPT LOAD, without duplicating the code to
      create the Lua function name. Note that this requires to re-compute the
      body SHA1 in the case of EVAL seeing a script for the first time, but
      this should not change scripting performance in any way because new
      scripts definition is a rare event happening the first time a script is
      seen, and the SHA1 computation is anyway not a very slow process against
      the typical Redis script and compared to the actua Lua byte compiling of
      the body.
      
      Note that the function used to assert() if a duplicated script was
      loaded, however actually now two times over three, we want the function
      to handle duplicated scripts just fine: this happens in SCRIPT LOAD and
      in RDB AUX "lua" loading. Moreover the assert was not defending against
      some obvious failure mode, so now the function always tests against
      already defined functions at start.
      c85c84be
    • A
      Remove useless variable check from luaCreateFunction(). · 85b24770
      antirez 提交于
      The block is already inside if (allow_dup).
      85b24770
    • A
      Fix issue #4505, Lua RDB AUX field loading of existing scripts. · a945e5c0
      antirez 提交于
      Unfortunately, as outlined by @soloestoy in #4505, "lua" AUX RDB field
      loading in case of duplicated script was still broken. This commit fixes
      this problem and also a memory leak introduced by the past commit.
      
      Note that now we have a regression test able to duplicate the issue, so
      this commit was actually tested against the regression. The original PR
      also had a valid fix, but I prefer to hide the details of scripting.c
      outside scripting.c, and later "SCRIPT LOAD" should also be able to use
      the function luaCreateFunction() instead of redoing the work.
      a945e5c0
    • A
      Regression test for #4505 (Lua AUX field loading). · 65a2e40a
      antirez 提交于
      65a2e40a
    • A
      DEBUG change-repl-id implemented. · d6c70f22
      antirez 提交于
      With PSYNC2 to force a full SYNC in tests is hard. With this new DEBUG
      subcommand we just need to call it and then CLIENT KILL TYPE master in
      the slave.
      d6c70f22
  6. 01 12月, 2017 9 次提交