From: <n-...@us...> - 2012-08-28 10:33:34
|
Revision: 6597 http://gfarm.svn.sourceforge.net/gfarm/?rev=6597&view=rev Author: n-soda Date: 2012-08-28 10:33:28 +0000 (Tue, 28 Aug 2012) Log Message: ----------- backout temporary workaround about #431, which was added in r6591, to use different implementation of the workaround. Revision Links: -------------- http://gfarm.svn.sourceforge.net/gfarm/?rev=6591&view=rev Modified Paths: -------------- gfarm_v2/branches/2.5/server/gfmd/db_journal.c gfarm_v2/branches/2.5/server/gfmd/db_pgsql.c Modified: gfarm_v2/branches/2.5/server/gfmd/db_journal.c =================================================================== --- gfarm_v2/branches/2.5/server/gfmd/db_journal.c 2012-08-24 17:10:11 UTC (rev 6596) +++ gfarm_v2/branches/2.5/server/gfmd/db_journal.c 2012-08-28 10:33:28 UTC (rev 6597) @@ -3248,26 +3248,11 @@ { gfarm_error_t e; - /* workaround for SourceForge #431 */ - static int previous_was_store_filecopy_add; - int this_is_store_filecopy_add = 0; - switch (ope) { case GFM_JOURNAL_BEGIN: e = ops->begin(seqnum, obj); break; case GFM_JOURNAL_END: - e = ops->end(seqnum, obj); - /* workaround for SourceForge #431 */ - if (ops == store_ops && - previous_was_store_filecopy_add && - e == GFARM_ERR_UNKNOWN) { - gflog_error(GFARM_MSG_1003545, - "%s: ignoring transaction abort seqnum=%llu " - "caused by duplicate filecopy_add", - diag, (unsigned long long)seqnum); - e = GFARM_ERR_NO_ERROR; - } - break; + e = ops->end(seqnum, obj); break; case GFM_JOURNAL_HOST_ADD: e = ops->host_add(seqnum, obj); break; case GFM_JOURNAL_HOST_MODIFY: @@ -3315,11 +3300,7 @@ case GFM_JOURNAL_INODE_CKSUM_REMOVE: e = ops->inode_cksum_remove(seqnum, obj); break; case GFM_JOURNAL_FILECOPY_ADD: - e = ops->filecopy_add(seqnum, obj); - /* workaround for SourceForge #431 */ - if (ops == store_ops) - this_is_store_filecopy_add = 1; - break; + e = ops->filecopy_add(seqnum, obj); break; case GFM_JOURNAL_FILECOPY_REMOVE: e = ops->filecopy_remove(seqnum, obj); break; case GFM_JOURNAL_DEADFILECOPY_ADD: @@ -3375,9 +3356,6 @@ diag, (unsigned long long)seqnum, journal_operation_name(ope), gfarm_error_string(e)); } - /* workaround for SourceForge #431 */ - if (ops == store_ops) - previous_was_store_filecopy_add = this_is_store_filecopy_add; return (e); } Modified: gfarm_v2/branches/2.5/server/gfmd/db_pgsql.c =================================================================== --- gfarm_v2/branches/2.5/server/gfmd/db_pgsql.c 2012-08-24 17:10:11 UTC (rev 6596) +++ gfarm_v2/branches/2.5/server/gfmd/db_pgsql.c 2012-08-28 10:33:28 UTC (rev 6597) @@ -440,7 +440,7 @@ /* * XXX FIXME: - * gfarm_pgsql_check_insert_dup_ok() is workaround for SourceForge #407, #431. + * gfarm_pgsql_check_insert_dup_ok() is workaround for SourceForge #407. * This function should be removed. */ static gfarm_error_t @@ -649,7 +649,7 @@ assert(transaction_nesting == 0); if (gfarm_get_metadb_replication_enabled() && seqnum > 0) { - gfarm_error_t e, e2; + gfarm_error_t e; struct db_seqnum_arg a; a.name = ""; @@ -659,7 +659,6 @@ gflog_debug(GFARM_MSG_1003245, "gfarm_pgsql_seqnum_modify : %s", gfarm_error_string(e)); - e2 = gfarm_pgsql_exec_and_log("ROLLBACK", diag); return (e); } } @@ -743,7 +742,7 @@ /* * XXX FIXME: - * gfarm_pgsql_insert0_dup_ok() is workaround for SourceForge #407, #431. + * gfarm_pgsql_insert0_dup_ok() is workaround for SourceForge #407. * This function should be removed. */ static gfarm_error_t @@ -789,7 +788,7 @@ /* * XXX FIXME: - * gfarm_pgsql_insert_dup_ok() is workaround for SourceForge #407, #431. + * gfarm_pgsql_insert_dup_ok() is workaround for SourceForge #407. * This function should be removed. */ static gfarm_error_t @@ -2378,18 +2377,13 @@ return (e); } -/* - * XXX FIXME: - * gfarm_pgsql_insert_dup_ok() is workaround for SourceForge #431. - * That function should be replaced by gfarm_pgsql_insert. - */ static gfarm_error_t gfarm_pgsql_filecopy_add(gfarm_uint64_t seqnum, struct db_filecopy_arg *arg) { return (pgsql_filecopy_call(seqnum, arg, "INSERT INTO FileCopy (inumber, hostname) VALUES ($1, $2)", - gfarm_pgsql_insert_dup_ok, + gfarm_pgsql_insert, "pgsql_filecopy_add")); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |