neverchanje commented on a change in pull request #656:
URL: https://github.com/apache/incubator-pegasus/pull/656#discussion_r549548615



##########
File path: src/server/rocksdb_wrapper.h
##########
@@ -46,11 +53,37 @@ class rocksdb_wrapper : public 
dsn::replication::replica_base
     /// \result ctx.found=false if record is not found. Still 0 is returned.
     int get(dsn::string_view raw_key, /*out*/ db_get_context *ctx);
 
+    int write_batch_put(int64_t decree,
+                        dsn::string_view raw_key,
+                        dsn::string_view value,
+                        uint32_t expire_sec);
+    int write_batch_put_ctx(const db_write_context &ctx,
+                            dsn::string_view raw_key,
+                            dsn::string_view value,
+                            uint32_t expire_sec);
+    int write(int64_t decree);
+    void clear_up_write_batch();
+
+    void set_default_ttl(uint32_t ttl);
+
 private:
+    uint32_t db_expire_ts(uint32_t expire_ts);
+
     rocksdb::DB *_db;
     rocksdb::ReadOptions &_rd_opts;
+    std::unique_ptr<pegasus_value_generator> _value_generator;
+    std::unique_ptr<rocksdb::WriteBatch> _write_batch;
+    std::unique_ptr<rocksdb::WriteOptions> _wt_opts;
+    rocksdb::ColumnFamilyHandle *_meta_cf;

Review comment:
       ```suggestion
       pegasus_value_generator _value_generator;
       rocksdb::WriteBatch _write_batch;
       rocksdb::WriteOptions _wt_opts;
       rocksdb::ColumnFamilyHandle *_meta_cf;
   ```
   
   Why not use value?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to