Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-12555

.NET: Thin Client: deserializing DateTime fields causes BinaryTypeGet request for every value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.4, 2.5, 2.6, 2.7, 2.8, 2.7.5, 2.7.6
    • 2.8
    • platforms
    • Improve serialization performance for DateTime and other ISerializable types
    • Important

    Description

      Actual: The following code causes 10 BinaryProcessorClient.GetBinaryType calls (2 fields, 5 Foo instances). Every call is a server request.

      Expected: 0 calls. Binary metadata should be cached after PutAll call.

      public class CacheDateTimeMetaTest : ClientTestBase
          {
              [Test]
              public void TestDateTimeMeta()
              {
                  var data = Enumerable.Range(1, 5)
                      .Select(x => new Foo
                      {
                          Id = x,
                          StartDate = DateTime.Now.AddHours(x),
                          EndDate = DateTime.Now.AddDays(x)
                      });
      
                  var cache = Client.GetOrCreateCache<int, Foo>("foo");
                  cache.PutAll(data.Select(x => new KeyValuePair<int, Foo>(x.Id, x)));
      
                  var res = cache.Query(new ScanQuery<int, Foo>()).GetAll();
                  Assert.AreEqual(cache.GetSize(), res.Count);
              }
      
              public class Foo
              {
                  public int Id { get; set; }
                  public DateTime? StartDate { get; set; }
                  public DateTime? EndDate { get; set; }
              }
          }
      

      This causes huge performance issues.

      Workaround

      • Force Timestamp format for all DateTime values

      User list discussion: http://apache-ignite-users.70518.x6.nabble.com/Getting-all-data-from-cache-via-scan-query-is-taking-lot-of-time-td30949.html

      Attachments

        Issue Links

          Activity

            People

              ptupitsyn Pavel Tupitsyn
              ptupitsyn Pavel Tupitsyn
              Igor Sapego Igor Sapego
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m