[Assorted-commits] SF.net SVN: assorted:[1279] ydb/trunk
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-03-10 23:32:32
|
Revision: 1279 http://assorted.svn.sourceforge.net/assorted/?rev=1279&view=rev Author: yangzhang Date: 2009-03-10 23:32:14 +0000 (Tue, 10 Mar 2009) Log Message: ----------- - fixed optimized build issues with unused variables - fixed bug: issue_txns not updating seqno correctly on final batch - renamed methods of and reinstated pwal - removed unnecessary sleep at end of process_txns - relabeled messages to make explicit their approximating nature - added clamp to setup-deps - updated notes/todos Modified Paths: -------------- ydb/trunk/README ydb/trunk/src/main.lzz.clamp ydb/trunk/tools/test.bash Modified: ydb/trunk/README =================================================================== --- ydb/trunk/README 2009-03-09 23:02:12 UTC (rev 1278) +++ ydb/trunk/README 2009-03-10 23:32:14 UTC (rev 1279) @@ -536,6 +536,15 @@ - TODO async (threaded) wal - TODO 0-node 0-copy (don't need to use threads, just process each batch immed) +- DONE figure out why i'm not getting all the responses + - because issue_txns was not incrementing seqno correctly on the last batch + - fixed + - because start_seqno in handle_responses was not actually being initialized + to the correct starting seqno (there is some delay between the time the + issue_txns begins issuing and the time the response_handler thread starts) + - decided to leave this as-is; getting an accurate number is too much effort + - relabeled the messages to be "roughly" + - TODO show aries-write - TODO checkpointing + replaying log from replicas (not from disk) - TODO scale-up on multicore Modified: ydb/trunk/src/main.lzz.clamp =================================================================== --- ydb/trunk/src/main.lzz.clamp 2009-03-09 23:02:12 UTC (rev 1278) +++ ydb/trunk/src/main.lzz.clamp 2009-03-10 23:32:14 UTC (rev 1279) @@ -40,6 +40,7 @@ #define ref boost::ref #define tuple boost::tuple #define make_tuple boost::make_tuple +#define unused __attribute__((unused)) using namespace boost; using namespace boost::archive; @@ -548,15 +549,15 @@ void logbuf(const void *buf, size_t len) { of.write(reinterpret_cast<const char*>(buf), len); } - void del(int key) { + void logdel(int key) { int op = op_del; // TODO: is this really necessary? out & op & key; } - void write(int key, int val) { + void logwrite(int key, int val) { int op = op_write; out & op & key & val; } - void commit() { + void logcommit() { int op = op_commit; out & op; } @@ -691,7 +692,6 @@ if (seqno == stop_on_seqno) { cout << "stopping on issue of seqno " << seqno << endl; stop_hub.set(); - break; } ++seqno; @@ -776,14 +776,14 @@ case Op::write: { int value = op.value(); - if (use_pwal) g_wal->write(key, value); + if (use_pwal) g_wal->logwrite(key, value); if (it == map.end()) map[key] = value; else it->second = value; break; } case Op::del: if (it != map.end()) { - if (use_pwal) g_wal->del(key); + if (use_pwal) g_wal->logdel(key); map.erase(it); } break; @@ -792,7 +792,7 @@ } if (res != nullptr) fin_result(*res); - if (use_pwal) g_wal->commit(); + if (use_pwal) g_wal->logcommit(); } void @@ -902,7 +902,6 @@ } __ref(send_states).push(recovery_t()); __ref(w).mark_and_flush(); - st_sleep(1); }); try { @@ -1253,7 +1252,7 @@ recovery_end_time = sub.take(); recovery_end_seqno = seqno; cout << rid << ": "; - showtput("during recovery, finished", recovery_end_time, + showtput("during recovery, finished roughly", recovery_end_time, recovery_start_time, recovery_end_seqno, recovery_start_seqno); } } @@ -1261,7 +1260,7 @@ void cleanup() { long long end_time = current_time_millis(); cout << rid << ": "; - showtput("handled", end_time, start_time, seqno, start_seqno); + showtput("handled roughly", end_time, start_time, seqno, start_seqno); if (recovery_end_time > -1) { cout << rid << ": "; showtput("after recovery, finished", end_time, recovery_end_time, @@ -1672,8 +1671,8 @@ swap(buf, reader.buf()); reader.reset_range(chunk.get<1>(), chunk.get<2>()); while (reader.start() < reader.end()) { - char *start = reader.start(); - uint32_t prefix = reader.read<uint32_t>(); + unused char *start = reader.start(); + unused uint32_t prefix = reader.read<uint32_t>(); assert(prefix < 10000); assert(start + sizeof(uint32_t) + prefix <= reader.end()); batch.Clear(); Modified: ydb/trunk/tools/test.bash =================================================================== --- ydb/trunk/tools/test.bash 2009-03-09 23:02:12 UTC (rev 1278) +++ ydb/trunk/tools/test.bash 2009-03-10 23:32:14 UTC (rev 1279) @@ -214,6 +214,7 @@ /tmp/st-1.8.tar.gz \ /tmp/protobuf-2.0.2.tar.bz2 \ /tmp/boost_1_37_0.tar.bz2 \ + /tmp/clamp_053_src.tar.gz \ clamp.patch \ ^:/tmp/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |