Triton Repository branch, master, updated. 2da664fb74dd9834dae5d73e376da6b8d82964f9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Triton Repository". The branch, master has been updated via 2da664fb74dd9834dae5d73e376da6b8d82964f9 (commit) from 6e8d7c453a9170a01110b05400abc48fe2497245 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2da664fb74dd9834dae5d73e376da6b8d82964f9 Author: Phil Carns <[email protected]> Date: Fri Oct 29 17:22:36 2010 -0400 use real txn numbering in rosd write, untested ----------------------------------------------------------------------- Summary of changes: code/src/replicated-osd/replicated-osd.aer | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) Diff of changes: diff --git a/code/src/replicated-osd/replicated-osd.aer b/code/src/replicated-osd/replicated-osd.aer index fe68a4a..99a6dfb 100644 --- a/code/src/replicated-osd/replicated-osd.aer +++ b/code/src/replicated-osd/replicated-osd.aer @@ -29,6 +29,7 @@ #include "src/placement/placement.hae" #include "src/replicated-osd/rosd-utils.h" +#include "src/replicated-osd/rosd-trans-nr-cache.hae" #include "src/replicated-osd/replicated-osd.haer" #include "src/common/triton-error.h" #include "src/common/triton-debug.h" @@ -38,6 +39,7 @@ #include "src/versioned-osd/prototype/versioned-osd.hae" #define REP_FACTOR_FORK 1000 +#define TRANS_NR_CACHE_SIZE 1024 /* TODO: tunable? */ static triton_debug_mask_t rosd_dbg_mask; @@ -51,11 +53,14 @@ static triton_ret_t rosd_init(void) return(tret); } - return(TRITON_SUCCESS); + tret = trans_nr_cache_init(TRANS_NR_CACHE_SIZE); + + return(tret); } static void rosd_finalize(void) { + trans_nr_cache_finalize(); return; } @@ -319,7 +324,7 @@ static __blocking triton_ret_t rosd_write_do_work( pbranch { triton_uint128_to_string(oid_str, TRITON_UINT128_STRLEN, oid); - triton_debug(rosd_dbg_mask, "ROSD local write of oid %s on %d'th server.\n", oid_str, my_position); + triton_debug(rosd_dbg_mask, "ROSD local write of oid %s on %d'th server, transaction number %llu.\n", oid_str, my_position, llu(txn_number)); /* perform local operation */ local_tret = rosd_write_local_storage(oid, fork, txn_number, buffer, offset, flags); @@ -705,6 +710,7 @@ __remote __blocking triton_ret_t rosd_write( char* buffer_offsets[1]; uint32_t replication_factor; uint64_t txn_number; + struct trans_nr_cache_entry* entry_p; /* retrieve the replication factor from the object */ obj_offset = 0; @@ -727,10 +733,10 @@ __remote __blocking triton_ret_t rosd_write( */ assert(my_position == 0); - /* TODO: need a data structure to keep track of current version - * number.... hard coding for now. - */ - txn_number = 2; + /* figure out what transaction number to use */ + tret = trans_nr_cache_get(&entry_p, req->oid, &txn_number); + /* TODO: rpc's can't propagate errors yet */ + assert(tret == TRITON_SUCCESS); tret = rosd_write_do_work( req->oid, @@ -743,6 +749,8 @@ __remote __blocking triton_ret_t rosd_write( my_position, peer_addr); + trans_nr_cache_put(entry_p); + /* TODO: rpc's can't propagate errors yet */ assert(tret == TRITON_SUCCESS); hooks/post-receive -- Triton Repository
participants (1)
-
noreply@mcs.anl.gov