1. 19 Mar, 2020 1 commit
  2. 18 Mar, 2020 7 commits
    • Shadi Massalha's avatar
      Sentinel Support Derived from pr-692 (#1067) · b2db13fc
      Shadi Massalha authored
      This PR is derived from PR-692 and have been merged with the latest master commit.
      Things that have been done:
      1. review code for PR-692
      2. fixed potential infinite loop in the code
      3. Adapt code to success build with the latest master commit
      4. Manual testing on 3 Sentinel nodes and 3 Redis nodes (connection and failover)
      
      Usage:
      ```C#
                      ConfigurationOptions sentinelConfig = new ConfigurationOptions();
                      sentinelConfig.ServiceName = "mymaster";
                      sentinelConfig.EndPoints.Add("192.168.99.102", 26379);
                      sentinelConfig.EndPoints.Add("192.168.99.102", 26380);
                      sentinelConfig.EndPoints.Add("192.168.99.102", 26381);
                      sentinelConfig.TieBreaker = "";
                      sentinelConfig.DefaultVersion = new Version(4, 0, 11);                 
                      // its important to set the Sentinel commands supported
                      sentinelConfig.CommandMap = CommandMap.Sentinel;
      
                      // Get sentinel connection
                      ConnectionMultiplexer sentinelConnection = ConnectionMultiplexer.Connect(sentinelConfig, Console.Out);
                      // Create master service configuration
                      ConfigurationOptions masterConfig = new ConfigurationOptions { ServiceName = "mymaster" };
                      // Get master Redis connection
                      var redisMasterConnection = sentinelConnection.GetSentinelMasterConnection(masterConfig);
      
                      ...
                     IDatabase db = redisMasterConnection.GetDatabase();                
                     db.StringSet(key, value);
                     ...
                     string value1 = db.StringGet(key);
      
      ```
      b2db13fc
    • Marc Gravell's avatar
      fix error with DNS resolution breaking endpoint iterator (#1393) · 748f1fa7
      Marc Gravell authored
      * re-implement GetEnumerator in EndPointCollection to be a bit more forgiving to concurrent changes during iteration
      
      * poke release notes
      748f1fa7
    • mgravell's avatar
      more release notes for 2.1.0 · 3f0c2b81
      mgravell authored
      3f0c2b81
    • hamish-omny's avatar
      Ensure that _activeMessage is always cleared, including if an exception is... · 58e8d63e
      hamish-omny authored
      Ensure that _activeMessage is always cleared, including if an exception is thrown while trying to send the message or flush the connection. Leaving _activeMessage set causes WriteMessageInsideLock to always return a "NoConnectionAvailable" error indefinitely (#1374)
      Co-authored-by: 's avatarNick Craver <craver@stackoverflow.com>
      58e8d63e
    • Gunnar Liljas's avatar
    • Nick Craver's avatar
      Add F# compatibility enhancements for #831 (#1386) · 659d5149
      Nick Craver authored
      Asked for in #831 and low overhead so why not! I didn't do `RedisChannel` since it already has a constructor available. Tests added to ensure these are used in a way we don't break them.
      659d5149
    • Marc Gravell's avatar
      eef7b8d6
  3. 17 Mar, 2020 2 commits
  4. 15 Mar, 2020 2 commits
    • Nick Craver's avatar
      Remove Unspecified/ from errors and test tweaks (#1385) · afc4ec1f
      Nick Craver authored
      In going through issues, I see many users confused by `Unspecified/` and it really serves no purpose. Let's get a quick win (and add a test for it).
      
      Also, WSL2 it appears has clock jitter - we can accommodate that while having a valid test, fixing that local case.
      afc4ec1f
    • Nick Craver's avatar
      Add test for #1183 (#1384) · f4a3d964
      Nick Craver authored
      Clarifies how IPv6 needs to be expressed in example usage.
      f4a3d964
  5. 14 Mar, 2020 7 commits
    • Nick Craver's avatar
      Add test to illustrate #1133 · c7cb6df9
      Nick Craver authored
      c7cb6df9
    • Nick Craver's avatar
      Add release notes and tag for v2.0.601 · 32c8667a
      Nick Craver authored
      32c8667a
    • Nick Craver's avatar
      Move ExecCompletes_Issue943 to long running · d0f7abf1
      Nick Craver authored
      This is 2 of the 6 minutes of test CPU time locally....don't need to hang on this so much.
      d0f7abf1
    • Nick Craver's avatar
      Fix naming of _activeMessage · 5a36dc7a
      Nick Craver authored
      Tidying this up so the diff/fix in #1374 is easier to analyze.
      5a36dc7a
    • Nick Craver's avatar
      Set the field instead of the property · 08bc1fb6
      Nick Craver authored
      Since logic exists in the getter, we need to set the field across for actual quality.  The `Issue883_Exhaustive` test illustrates the difference in the comparison (currently failing).
      08bc1fb6
    • Björn Lundström's avatar
    • Nick Craver's avatar
      NRediSearch Test Suite Fixes (#1383) · 084c9c18
      Nick Craver authored
      ### NRediSearch
      - Updated module so we're testing the right thing
      - More output in the logging path for diagnosing issues
      - Remove all the `FLUSHDB` calls masking issues
      - Handle duplicate documents in latest module
      
      Note: **locally** (on WSL 2), this fixes some issues and introduces stability but *does not* fix 2 scoring issues. Suggestions are coming back with scores > 1.0, which by the documentation is not supposed to happen...so I'm not sure what should be happening here. Here's the local WSL fail:
      ```
       NRediSearch.Test.ClientTests.ClientTest.TestGetSuggestionWithScore:
        Message: 
          StackExchange.Redis.RedisCommandException : Missing required fields:  score not within range: 2.11660146713257
        Stack Trace: 
          SuggestionBuilder.Build() line 99
          Client.GetSuggestionsWithPayloadAndScores(RedisResult[] results) line 1271
          Client.GetSuggestions(String prefix, SuggestionOptions options) line 796
          ClientTest.TestGetSuggestionWithScore() line 701
      ```
      ```
      NRediSearch.Test.ClientTests.ClientTest.TestAddSuggestionGetSuggestionPayloadScores:
        Message: 
          StackExchange.Redis.RedisCommandException : Missing required fields:  score not within range: 2.71068739891052
        Stack Trace: 
          SuggestionBuilder.Build() line 99
          Client.GetSuggestionsWithPayloadAndScores(RedisResult[] results) line 1271
          Client.GetSuggestions(String prefix, SuggestionOptions options) line 796
          ClientTest.TestAddSuggestionGetSuggestionPayloadScores() line 642
      ```
      
      However, the current fixes tidy up the CI pipeline so I recommend merging this as-is, then I'll keep following up with various local errors and I'm looking at some Docker test options as alternatives to WSL2 so that people can run either.
      084c9c18
  6. 13 Mar, 2020 1 commit
  7. 28 Feb, 2020 1 commit
  8. 27 Feb, 2020 4 commits
  9. 26 Feb, 2020 2 commits
  10. 14 Feb, 2020 1 commit
  11. 04 Feb, 2020 3 commits
  12. 03 Feb, 2020 9 commits
    • mgravell's avatar
      more case insensitivity (redisearch) · 92125519
      mgravell authored
      92125519
    • mgravell's avatar
      redisearch: ignore case changes in exceptions · 90860596
      mgravell authored
      90860596
    • mgravell's avatar
      clarify that release notes are preview · 9c076e27
      mgravell authored
      9c076e27
    • mgravell's avatar
      update release notes · d4a0ab65
      mgravell authored
      d4a0ab65
    • Andreas Caravella's avatar
      Make SocketManager worker count configurable (#1115) · 76c4462d
      Andreas Caravella authored
      * add overload exposing workerCount and move CTOR's together
      
      * update XML comment to align with implementation
      
      * update according to PR feedback
      76c4462d
    • Marc Gravell's avatar
      Async enumerable (#1087) · fbe89e2a
      Marc Gravell authored
      * first steps into async-enumerable
      
      * move to the old iterator
      
      * make it compile
      
      * add missing APIs
      
      * re-hide CursorEnumerable<T> - invent dummy enumerable APIs for now; implement KeysAsync; make pageOffset work for all; increase the default library page size, because 10 is *way* too small - noting that we still need to compare to 10 when building messages
      
      * missing awaits
      
      * fix range error in ValuePairInterleavedProcessorBase<T>; fix HSCAN tests
      
      * async streams is "8.0", not "preview"
      
      * update async enumerable API
      
      * eek, the special compiler trick for spans only apples to byte - presumably due to endianness; this was allocating *lots*
      
      * fix page size merge fail
      
      * lib updates
      
      * fix mock tests
      
      * fix async signature detection re IAsyncEnumerable
      
      * fix bug in interleaved pair processor
      
      * fix more scanning glitches
      
      * fix resume on scans
      
      * detect and warn on thread-theft
      
      * more logs in NoticesConnectFail
      fbe89e2a
    • Tommy Hanks's avatar
      Bring NRediSearch "even" with JRediSearch (#1267) · 9b8bdf36
      Tommy Hanks authored
      * The casing in the error message probably changed.
      
      I checked the RediSearch source and found that it's been "Unsupported
      language" since at least August 28, 2018.
      
      * `FT.OPTIMIZE` has been deprecated.
      
      Index optimizations are now handled by the internal garbage collector in
      the background.
      
      https://oss.redislabs.com/redisearch/Commands.html#ftoptimize
      
      * Started work on porting the aggregation builder class and test from
      JRediSearch.
      
      * Ported in static support methods.
      
      * Added Load, Limit, and SortBy
      
      * Finished adding the sortby's
      
      * Group by and apply have been ported.
      
      * Added in the `Filter` method.
      
      * Added in `Cursor` builder method.
      
      Made the private `args` member naming more consistent the rest of the
      project by prefixing with an underscore.
      
      * Made this a privately settable property as this is basically what the
      Java version had.
      
      * Implemented `ArgsString` property here. This is from the Java
      `getArgsString`
      
      * Args list is now accessible just like the Java version.
      
      * Added in serialize redis args method...
      
      * Ported `TestAggregations` test from JRediSearch.
      
      Kept everything as close to the original as possible.
      
      * Marked these methods obsolete in favor of the ones that use the
      AggregationBuilder.
      
      * Introduced new overloads for the `Aggregate` method.
      
      Marked the obsolete unit test as obsolete.
      
      * For completeness I added in the commands that should be issued by the
      setup portion of this test.
      
      * Ported in the `TestApplyAndFilterAggregations` test.
      
      * Porting over the support for dealing with aggregate cursors.
      
      * Initial pass at implementing cursor delete.
      
      * Initial pass at implementing `CursorRead` and `CursorReadAsync`
      
      * Fixed issue with supplying the Redisearch command with sorting.
      
      Fixed some assertions...
      
      * Added support for return fields.
      
      * Fixed apparently typo.
      
      * Moved this test class to be more consistent with the JRedisearch
      library.
      
      * Cleaned up imports here.
      
      * Initial pass at porting the tag for `AlterIndex`.
      
      * Current progress porting the FT.ALTER command.
      
      * Added in a new type for capturing the FT.INFO result...
      
      * The test for AlterIndex (Add) is complete.
      
      * Altered test here to meet assertions from JRediSearch.
      
      * Ported support for the FT.MGET command.
      
      * Ported the Suggestion with Builder from JRediSearch.
      
      * Ported SuggestionOptions.
      
      * Further fleshed out the suggestion options using JRediSearch as a guide.
      
      * Ported over the expanded Suggestions functionality from JRediSearch.
      
      * Ported this from JRediSearch.
      
      * Ported more tests from JRediSearch.
      
      Fixed some silly bugs...
      
      * Ported the last three auto suggest tests from JRediSearch.
      
      * More tests ported from JRediSearch.
      
      * Implemented ability to add multiple documents at once. Started on
      deleting multiple documents at once...
      
      * In order to match the functionality found in JRediSearch, I'm catching
      RedisServerExceptions that contain the message "Document already in
      index".
      
      * Added support for the `INKEYS` search query modifier.
      
      * Ported in a covering test for the AggregationBuilder.
      
      * Cleaned up builder access in the Suggestion and SuggestionOptions
      classes.
      
      * Refactored IndexOptions to make them behave more like JRediSearch.
      
      Removed NOSCOREIDX as that has been deprecated.
      
      * PR feedback.
      
      Marked AggregationBuilder as sealed because (at least initially) we
      don't expect any inheritance here.
      
      Dropped the call to `ToString` when appending the value for "MAX" to a
      SortBy clause because it isn't needed.
      
      Changed `ArgsString` to a method to indicate that we're not simply
      exposing internal state. Made the method internal as it's present for
      test purposes.
      
      Removed the `Args` property because it's not clear that we need it. It
      was ported from JRediSearch because it was there.
      
      * Simplified this with a default value.
      
      * Removed calls to `ToString` in order to allow the library to worry about
      proper formatting.
      
      * Combined constructors here to keep things a bit simpler.
      
      * Cleaned up the unused import there.
      
      * Readded the `OptimizeIndex` and `OptimizeIndexAsync` methods here to
      preserve backwards compatibility.
      
      * Returning Array.Empty<Document> instead of a new empty array each time.
      
      * Sealed the suggestion class as there should be no reason (currently) for
      anything to inherit from it.
      
      Cleaned up how we're ensuring that an object to compare is not null and
      is of an appropriate type.
      
      Fixed equality check so that it doesn't blow up on null values (payload
      specifically).
      
      * Converted the class `With` to be an enum.
      
      * Now looking up these values on demand.
      
      * Reintroduced the original GetInfo API methods and changed the new ones
      to GetInfoParsed and GetInfoParsedAsync.
      
      * Revertered changes that turned ConfiguredIndexOptions into IndexOptions.
      
      Added in `SetNoStopwords` method to match the JRediSearch api as well as
      provide a conveinient means for keeping the default index options AND
      specifying that no stopwords be considered.
      
      Fixed `TestStopwords` unit test by specifying `STOPWORDS 0` by calling
      `SetNoStopwords` which adds the `DisableStopWords` option to the
      configured index options.
      
      * Since this optimization doesn't exist anymore it should be removed from
      your index definitions.
      
      * Added back the original get suggestions method, but this time it calls
      the new version which leverages the suggestion builder.
      
      Added a small covering test.
      
      * Consolidated the constructors here as suggested by Marc.
      Co-authored-by: 's avatarNick Craver <nrcraver@gmail.com>
      Co-authored-by: 's avatarMarc Gravell <marc.gravell@gmail.com>
      9b8bdf36
    • Björn Lundström's avatar
    • Muhammad Adnan Rafiq's avatar
      Include details of abbreviations seen in exceptions (#1190) · 8b028166
      Muhammad Adnan Rafiq authored
      * Include details of abbreviations seen in exceptions
      
      I have been getting Redis Timeout under high load, but it was not making sense at all. So i opened the source to understand what these abbreviations meant. I hope it will help people understand error messages a lot better.
      My CPU Use case:
      If Redis dedicated thread pool state looks good, and global thread pool has more free threads than minimum threads, but your CPU is usage is 90%, more likely you will face time outs, depending upon the size of bytes client is trying to read or write.
      
      * Update Timeouts.md
      
      Updating abbreviations in markdown table.
      8b028166