Details
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
- links to