Exemple #1
0
 private void Write(FasterKV <MyKey, MyValue, MyInput, MyOutput, MyContext, MyFunctions> h, MyContext context)
 {
     for (int i = 0; i < iterations; i++)
     {
         var _key = new MyKey {
             key = i, name = i.ToString()
         };
         var value = new MyValue {
             value = i.ToString()
         };
         h.Upsert(ref _key, ref value, context, 0);
     }
 }
Exemple #2
0
        private void Write(ClientSession <MyKey, MyValue, MyInput, MyOutput, MyContext, MyFunctions> session, MyContext context, FasterKV <MyKey, MyValue> fht)
        {
            for (int i = 0; i < iterations; i++)
            {
                var _key = new MyKey {
                    key = i, name = i.ToString()
                };
                var value = new MyValue {
                    value = i.ToString()
                };
                session.Upsert(ref _key, ref value, context, 0);

                if (i % 100 == 0)
                {
                    fht.TakeFullCheckpoint(out _);
                    fht.CompleteCheckpointAsync().GetAwaiter().GetResult();
                }
            }
        }