Commit d1e79c9a authored by yiwenshao's avatar yiwenshao

add comments

parent d6fe6757
...@@ -546,7 +546,7 @@ bool create_delta_helper(CreateDelta* this_is, const std::unique_ptr<Connect> &e ...@@ -546,7 +546,7 @@ bool create_delta_helper(CreateDelta* this_is, const std::unique_ptr<Connect> &e
// auto_increment on the BLEEDING and REGULAR tables // auto_increment on the BLEEDING and REGULAR tables
bool CreateDelta::apply(const std::unique_ptr<Connect> &e_conn, bool CreateDelta::apply(const std::unique_ptr<Connect> &e_conn,
Delta::TableType table_type){ Delta::TableType table_type){
//第一次apply,先写bleeding table.这个时候,map里面没有内容. //The first time we call this function, bleeding table will be written. nothing is stored in the map.
if (BLEEDING_TABLE == table_type) { if (BLEEDING_TABLE == table_type) {
assert(0 == id_cache.size()); assert(0 == id_cache.size());
} }
...@@ -622,8 +622,7 @@ bool DeleteDelta::apply(const std::unique_ptr<Connect> &e_conn, ...@@ -622,8 +622,7 @@ bool DeleteDelta::apply(const std::unique_ptr<Connect> &e_conn,
bool bool
writeDeltas(const std::unique_ptr<Connect> &e_conn, writeDeltas(const std::unique_ptr<Connect> &e_conn,
const std::vector<std::unique_ptr<Delta> > &deltas, const std::vector<std::unique_ptr<Delta> > &deltas,
Delta::TableType table_type) Delta::TableType table_type) {
{
for (const auto &it : deltas) { for (const auto &it : deltas) {
RFIF(it->apply(e_conn, table_type)); RFIF(it->apply(e_conn, table_type));
} }
......
...@@ -156,7 +156,7 @@ OnionMeta::fetchChildren(const std::unique_ptr<Connect> &e_conn) ...@@ -156,7 +156,7 @@ OnionMeta::fetchChildren(const std::unique_ptr<Connect> &e_conn)
return DBMeta::doFetchChildren(e_conn, deserialHelper); return DBMeta::doFetchChildren(e_conn, deserialHelper);
} }
//this applyTochildren is different from that of MappedMetadata because Enclayer is stored as vector.
bool bool
OnionMeta::applyToChildren(std::function<bool(const DBMeta &)> OnionMeta::applyToChildren(std::function<bool(const DBMeta &)>
fn) const fn) const
......
...@@ -3,4 +3,5 @@ mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists tdb" ...@@ -3,4 +3,5 @@ mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists tdb"
mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists tdb2" mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists tdb2"
mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists tdb3" mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists tdb3"
mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists micro_db" mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists micro_db"
mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists temp"
rm -rf ./shadow/* rm -rf ./shadow/*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment