1. 24 Apr, 2021 1 commit
  2. 22 Apr, 2021 2 commits
  3. 21 Apr, 2021 7 commits
  4. 20 Apr, 2021 4 commits
  5. 19 Apr, 2021 6 commits
    • Viktor Söderqvist's avatar
    • Hanna Fadida's avatar
      Modules: adding a module type for key space notification (#8759) · 53a4d6c3
      Hanna Fadida authored
      Adding a new type mask ​for key space notification, REDISMODULE_NOTIFY_MODULE, to enable unique notifications from commands on REDISMODULE_KEYTYPE_MODULE type keys (which is currently unsupported).
      
      Modules can subscribe to a module key keyspace notification by RM_SubscribeToKeyspaceEvents,
      and clients by notify-keyspace-events of redis.conf or via the CONFIG SET, with the characters 'd' or 'A' 
      (REDISMODULE_NOTIFY_MODULE type mask is part of the '**A**ll' notation for key space notifications).
      
      Refactor: move some pubsub test infra from pubsub.tcl to util.tcl to be re-used by other tests.
      53a4d6c3
    • guybe7's avatar
      Modules: Replicate lazy-expire even if replication is not allowed (#8816) · f40ca9cb
      guybe7 authored
      Before this commit using RM_Call without "!" could cause the master
      to lazy-expire a key (delete it) but without replicating to replicas.
      This could cause the replica's memory usage to gradually grow and
      could also cause consistency issues if the master and replica have
      a clock diff.
      This bug was introduced in #8617
      
      Added a test which demonstrates that scenario.
      f40ca9cb
    • Harkrishn Patro's avatar
      ACL channels permission handling for save/load scenario. (#8794) · 7a3d1487
      Harkrishn Patro authored
      
      
      In the initial release of Redis 6.2 setting a user to only allow pubsub access to
      a specific channel, and doing ACL SAVE, resulted in an assertion when
      ACL LOAD was used. This was later changed by #8723 (not yet released),
      but still not properly resolved (now it errors instead of crash).
      
      The problem is that the server that generates an ACL file, doesn't know what
      would be the setting of the acl-pubsub-default config in the server that will load it.
      so ACL SAVE needs to always start with resetchannels directive.
      
      This should still be compatible with old acl files (from redis 6.0), and ones from earlier
      versions of 6.2 that didn't mess with channels.
      Co-authored-by: default avatarHarkrishn Patro <harkrisp@amazon.com>
      Co-authored-by: default avatarOran Agra <oran@redislabs.com>
      7a3d1487
    • sundb's avatar
      Fix ouput buffer limit test (#8803) · 3a955d9a
      sundb authored
      The tail size of c->reply is 16kb, but in the test only publish a
      few chars each time, due to a change in #8699, the obuf limit
      is now checked a new memory allocation is made, so this test
      would have sometimes failed to trigger a soft limit disconnection
      in time.
      
      The solution is to write bigger payloads to the output buffer, but
      still limit their rate (not more than 100k/s).
      3a955d9a
    • Wen Hui's avatar
      fix invalid master_link_down_since_seconds in info repication (#8785) · 0413fbc7
      Wen Hui authored
      When replica never successfully connect to master, server.repl_down_since
      will be initialized to 0, therefore, the info master_link_down_since_seconds
      was showing the current unix timestamp, which does not make much sense.
      
      This commit fixes the issue by showing master_link_down_since_seconds to -1.
      means the replica never connect to master before.
      
      This commit also resets this variable back to 0 when a replica is turned into
      a master, so that it'll behave the same if the master is later turned into a
      replica again.
      
      The implication of this change is that if some app is checking if the value is > 60
      do something, like conclude the replica is stale, this could case harm (changing
      a big positive number with a small one).
      0413fbc7
  6. 18 Apr, 2021 3 commits
    • Yossi Gottlieb's avatar
      Revert cluster slot migration tests. (#8806) · c0f5c678
      Yossi Gottlieb authored
      Disables #8649 and subsequent attempts to stabilize the test.
      c0f5c678
    • Oran Agra's avatar
      Fix timing of new replication test (#8807) · a9897b00
      Oran Agra authored
      In github actions CI with valgrind, i saw that even the fast replica
      (one that wasn't paused), didn't get to complete the replication fast
      enough, and ended up getting disconnected by timeout.
      
      Additionally, due to a typo in uname, we didn't get to actually run the
      CPU efficiency part of the test.
      a9897b00
    • Oran Agra's avatar
      Improve testsuite print of log file (#8805) · f4b5a4d8
      Oran Agra authored
      1. the `dump_logs` option would have printed only logs of servers that were
         spawn before the test proc started, and not ones that the test proc
         started inside it.
      2. when a server proc catches an exception it should normally forward the
         exception upwards, specifically when it's an assertion that should be
         caught by a test proc above. however, in `durable` mode, we caught all
         exceptions printed them to stdout and let the code continue,
         this was wrong to do for assertions, which should have still been
         propagated to the test function.
      3. don't bother to search for crash log to print if we printed the the
         entire log anyway
      4. if no crash log was found, no need to print anything (i.e. the fact it
         wasn't found)
      5. rename warnings_from_file to crashlog_from_file
      f4b5a4d8
  7. 16 Apr, 2021 1 commit
  8. 15 Apr, 2021 4 commits
  9. 14 Apr, 2021 2 commits
  10. 13 Apr, 2021 8 commits
    • Viktor Söderqvist's avatar
      Modules API docs: Sections and links (#8442) · d7920ff9
      Viktor Söderqvist authored
      * Modules API docs: Link API function names to their definitions
      
      Occurrences of API functions are linked to their definition.
      
      A function index with links to all functions is added on the bottom
      of the page.
      
      Comment blocks in module.c starting with a markdown h2 heading are
      used as sections. A table of contents is generated from these
      headings.
      
      The functions names are changed from h2 to h3, since they are now
      rendered as sub-headings within each section.
      
      Existing sections in module.c are used with some minor changes.
      Some documentation text is added or sligtly modified.
      
      The markdown renderer will add IDs which may clash with our
      generated IDs. By prefixing section IDs with "section-" we make
      them different.
      
      Replace double dashes with a unicode long ndash
      d7920ff9
    • Huang Zhw's avatar
    • Viktor Söderqvist's avatar
      Small doc fix for stream module API (#8757) · 4938052f
      Viktor Söderqvist authored
      In a code example, using RedisModule_FreeString instead of
      RedisModule_Free makes it behave correctly regardless of whether
      automatic memory is used or not.
      4938052f
    • Oran Agra's avatar
      Revert "Fix: server will crash if rdbload or rdbsave method is not provided in... · b278e443
      Oran Agra authored
      Revert "Fix: server will crash if rdbload or rdbsave method is not provided in module (#8670)" (#8771)
      
      This reverts commit 808f3004.
      b278e443
    • Oran Agra's avatar
      c07e16fa
    • Wen Hui's avatar
      38da8d07
    • Oran Agra's avatar
      fix access to uninitialized var in checkClientPauseTimeoutAndReturnIfPaused (#8765) · 733daef1
      Oran Agra authored
      server.client_pause_end_time is uninitialized, or actually 0, at startup,
      which means this method would think the timeout was reached
      and go look for paused clients.
      
      This causes no harm since unpauseClients will not find any paused clients.
      733daef1
    • Oran Agra's avatar
      Fix busy loop in ae.c when timer event is about to fire (#8764) · 175a9e31
      Oran Agra authored
      The code used to decide on the next time to wake on a timer with
      microsecond accuracy, but when deciding to go to sleep it used
      milliseconds accuracy (with truncation), this means that it would wake
      up too early, see that there's no timer to process, and go to sleep
      again for 0ms again and again until the right microsecond arrived.
      
      i.e. a timer for 100ms, would sleep for 99ms, but then do a busy loop
      through the kernel in the last millisecond, triggering many calls to
      beforeSleep.
      
      The fix is to change all the logic in ae.c to work with microseconds,
      which is good since most of the ae backends support micro (or even nano)
      seconds. however the epoll backend, doesn't support micro, so to avoid
      this problem it needs to round upwards, rather than truncate.
      
      Issue created by the monotonic timer PR #7644 (redis 6.2)
      Before that, all the timers in ae.c were in milliseconds (using
      mstime), so when it requested the backend to sleep till the next timer
      event, it would have worked ok.
      175a9e31
  11. 12 Apr, 2021 1 commit
    • Yossi Gottlieb's avatar
      Fix failing cluster tests. (#8763) · 5e3a15ae
      Yossi Gottlieb authored
      Disable replica migration to avoid a race condition where the
      migrated-from node turns into a replica.
      
      Long term, this test should probably be improved to handle multiple
      slots and accept such auto migrations but this is a quick fix to
      stabilize the CI without completely dropping this test.
      5e3a15ae
  12. 11 Apr, 2021 1 commit
    • Wang Yuan's avatar
      Fix wrong check for aof fsync and handle aof fsync errno (#8751) · a0e19e3c
      Wang Yuan authored
      The bio aof fsync fd may be closed by main thread (AOFRW done handler)
      and even possibly reused for another socket, pipe, or file.
      This can can an EBADF or EINVAL fsync error, which will lead to -MISCONF errors failing all writes.
      We just ignore these errno because aof fsync did not really fail.
      
      We handle errno when fsyncing aof in bio, so we could know the real reason
      when users get -MISCONF Errors writing to the AOF file error
      
      Issue created with #8419
      a0e19e3c