Triton-commits
Threads by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
March 2015
- 2 participants
- 77 discussions
branch, trac-323-sos, updated. 5efedd840fc08bd6af03ac070e83f0e1170b7d69
by noreply@mcs.anl.gov 04 Mar '15
by noreply@mcs.anl.gov 04 Mar '15
04 Mar '15
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 "".
The branch, trac-323-sos has been updated
via 5efedd840fc08bd6af03ac070e83f0e1170b7d69 (commit)
via df1cc8d73f9e4446004ffb25b8debfb115dafb87 (commit)
via 2c09c00fc8daa7e78d0f601dfe7d7e8809adb89f (commit)
via 03b9c0f3895c25b8157bb5ef467d25b48be89c4b (commit)
via 40fd462d6268eb9e645ec61b051bec81f19d5c05 (commit)
via 3b3c8bcdbc726d12d3b14415834e5a4d6ce59709 (commit)
via 3cb24f34e69ef4d96f4439af00b56fe948e52c4e (commit)
via 30e1aa3cf62bc0e086b5d4104a4dcefe578e5faa (commit)
via a7bfff430e5fd4956068bec02f3304e914e8c67a (commit)
via 75061a0ae1ba30bc0a44811b5e10ae9921a7f9d0 (commit)
via e92a5d598e2039f7f45b739786560f77a059dd83 (commit)
via 6255ad6d94ac7cfad1b76d3b09401a9afc01af7a (commit)
via a77f0aab4bc342b9a2baed3bf986bad7a31f52ac (commit)
via bd774ca583282e68e01e21a07e0e74c2c4e1bc83 (commit)
via 3252604eafe2687c280adf1e7419a73956bff34b (commit)
via ce8cfe8e12ae0ffd631fabafbaeb3e1db7372f82 (commit)
via 5088e559671d00d6a7799d20e697764ac651a024 (commit)
via fcf3ce3112ce40928e580c37bb5a477a7ce3b331 (commit)
via 595ea4bd3e2e418b6d8a49993c3dbb0c3db2eebf (commit)
via 45dde21020bab4a4a7dd6c345bb09a103ae91cd9 (commit)
via 71caea9fcd24cb6dc960a0faf318e78d9041c855 (commit)
from 17b1d53430bc3432dc1580684046e46d5abd9c06 (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 5efedd840fc08bd6af03ac070e83f0e1170b7d69
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Wed Mar 4 10:43:48 2015 -0600
using built-in java array support a try
it's not the best - java arrays get copied into C on input and back from C on
output, even if it's a write. Inefficient, but the alternatives so far aren't
too great.
commit df1cc8d73f9e4446004ffb25b8debfb115dafb87
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Wed Mar 4 09:01:23 2015 -0600
tweaks to conditional test
commit 2c09c00fc8daa7e78d0f601dfe7d7e8809adb89f
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Thu Feb 26 13:26:43 2015 -0600
initial re-support for conditionals
without txn cache, limited in what it can do (auto_update_id will hard-error),
but at least seems to work for cond-all
concurrent updates still need to be checked
commit 03b9c0f3895c25b8157bb5ef467d25b48be89c4b
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Thu Feb 26 09:22:01 2015 -0600
invalid argument return code
commit 40fd462d6268eb9e645ec61b051bec81f19d5c05
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Tue Feb 24 16:09:51 2015 -0600
add tests for asg conditional operations
(just ASG_COND_ALL for now)
commit 3b3c8bcdbc726d12d3b14415834e5a4d6ce59709
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Tue Feb 24 15:59:58 2015 -0600
name change in swig
commit 3cb24f34e69ef4d96f4439af00b56fe948e52c4e
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Mon Feb 23 09:34:21 2015 -0600
header generation
commit 30e1aa3cf62bc0e086b5d4104a4dcefe578e5faa
Merge: a7bfff430e5fd4956068bec02f3304e914e8c67a 17b1d53430bc3432dc1580684046e46d5abd9c06
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Mon Feb 23 08:57:05 2015 -0600
Merge remote-tracking branch 'origin/trac-323-sos' into shared-lib
commit a7bfff430e5fd4956068bec02f3304e914e8c67a
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Tue Feb 17 16:14:57 2015 -0600
mutable asg_update_id_t
commit 75061a0ae1ba30bc0a44811b5e10ae9921a7f9d0
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Tue Feb 17 16:13:53 2015 -0600
fix CPPFLAG ordering, rm deprecated INCLUDES var
commit e92a5d598e2039f7f45b739786560f77a059dd83
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Tue Feb 17 15:29:11 2015 -0600
patch up type resolution of ASG_* macros
commit 6255ad6d94ac7cfad1b76d3b09401a9afc01af7a
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Mon Feb 16 14:33:37 2015 -0600
readme's for the bindings
commit a77f0aab4bc342b9a2baed3bf986bad7a31f52ac
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Mon Feb 16 14:27:27 2015 -0600
minor autoconf fixups
commit bd774ca583282e68e01e21a07e0e74c2c4e1bc83
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Mon Feb 16 14:21:07 2015 -0600
typo in maven build
commit 3252604eafe2687c280adf1e7419a73956bff34b
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Thu Feb 12 12:36:08 2015 -0600
bindings now closer to reasonable
commit ce8cfe8e12ae0ffd631fabafbaeb3e1db7372f82
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Thu Feb 12 12:34:05 2015 -0600
failed attmept to parse sys headers with swig
commit 5088e559671d00d6a7799d20e697764ac651a024
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Wed Feb 11 09:30:14 2015 -0600
fix up shared library / resource loading
commit fcf3ce3112ce40928e580c37bb5a477a7ce3b331
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Tue Feb 10 12:40:38 2015 -0600
change library name to the correct one
commit 595ea4bd3e2e418b6d8a49993c3dbb0c3db2eebf
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Tue Feb 10 12:38:19 2015 -0600
sanity check java binding config
commit 45dde21020bab4a4a7dd6c345bb09a103ae91cd9
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Tue Feb 10 09:42:26 2015 -0600
fixes to shared-lib support
commit 71caea9fcd24cb6dc960a0faf318e78d9041c855
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Thu Feb 5 14:45:24 2015 -0600
initial libtoolization (doesn't compile yet)
Basic approach looks right, but aecc and libtool aren't playing well. Will
need to figure out some way to get around this.
-----------------------------------------------------------------------
Summary of changes:
code/INSTALL | 5 +
code/Make.rules | 17 +-
code/Makefile.am | 13 +-
code/bindings/Makefile.subdir | 14 +-
code/bindings/README | 8 +
code/bindings/asg.i | 90 +++++++
code/bindings/java/README | 37 +++
code/bindings/java/asg-triton-java/pom.xml | 2 +-
.../java/gov/anl/mcs/asg/AsgTritonBootstrap.java | 25 +-
.../src/main/resources/{META-INF => }/.dummy | 0
code/configure.ac | 60 +++--
code/include/asg.h | 11 +-
code/maint/depend-ae.sh | 2 +-
code/maint/swig-cppflags.sh | 46 ++++
code/src/asg/Makefile.subdir | 2 +-
code/src/asg/asg-internal.ae | 78 ++++--
code/src/common/Makefile.subdir | 5 +-
code/src/placement/Makefile.subdir | 2 +-
code/src/remote/Makefile.subdir | 5 +-
code/src/replicated-osd/Makefile.subdir | 16 +-
code/src/replicated-osd/rosd-internal.hae | 4 +
code/src/replicated-osd/rosd-read.ae | 63 ++++-
code/src/replicated-osd/rosd-write.ae | 87 +++++--
code/src/replicated-osd/rosd.ae | 18 ++
code/src/replicated-osd/rosd.hae | 21 ++-
code/src/server/Makefile.subdir | 1 -
code/src/system-state/Makefile.subdir | 2 +-
code/src/zeroconf/Makefile.subdir | 2 +-
code/tests/Makefile.subdir | 5 +-
code/tests/asg/test-asg-cond.c | 270 ++++++++++++++++++++
.../asg/{test-asg-simple.sh => test-asg-cond.sh} | 2 +-
code/tests/asg/test-asg-simple.c | 2 +-
32 files changed, 781 insertions(+), 134 deletions(-)
create mode 100644 code/bindings/README
create mode 100644 code/bindings/java/README
rename code/bindings/java/asg-triton-java/src/main/resources/{META-INF => }/.dummy (100%)
create mode 100755 code/maint/swig-cppflags.sh
create mode 100644 code/tests/asg/test-asg-cond.c
copy code/tests/asg/{test-asg-simple.sh => test-asg-cond.sh} (91%)
Diff of changes:
diff --git a/code/INSTALL b/code/INSTALL
index 19c0849..76f7c67 100644
--- a/code/INSTALL
+++ b/code/INSTALL
@@ -138,6 +138,11 @@ Building Triton
# this example runs only the triton-cp test script
make TESTS=tests/triton-cp.sh check
+Building Triton Bindings
+========================
+
+See the README files under the bindings directory.
+
Running an example system
=========================
diff --git a/code/Make.rules b/code/Make.rules
index bc9c96c..b53bd6f 100644
--- a/code/Make.rules
+++ b/code/Make.rules
@@ -11,14 +11,27 @@ distversion:
.phony: tests
tests: $(check_PROGRAMS)
+AE_COMPILE_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
#
# rule for compiling aesop .ae files
+# (bastardized libtool invocation)
#
+.ae.lo:
+ $(AM_V_GEN) $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOL_FLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile \
+ $(AECC) $(AE_COMPILE_FLAGS) -o $@ $<
+
.ae.o:
- $(AM_V_GEN)$(AECC) -o $@ $< -- $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(AM_CFLAGS)
+ $(AM_V_GEN) $(AECC) $(AE_COMPILE_FLAGS) -o $@ $<
.hae.h:
- $(AM_V_GEN)$(AECC) -o $@ $< -j -- $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(AM_CFLAGS)
+ $(AM_V_GEN)$(AECC) -o $@ $< --ae-parse-hae $(AE_COMPILE_FLAGS)
+
+#
+# rule for compiling aesop .ae files
+#
#
# rules for .ae dependencies
diff --git a/code/Makefile.am b/code/Makefile.am
index 2fbd8c0..e9c28ca 100644
--- a/code/Makefile.am
+++ b/code/Makefile.am
@@ -3,9 +3,9 @@ ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS =
bin_SCRIPTS =
-noinst_LIBRARIES =
+noinst_LTLIBRARIES =
noinst_PROGRAMS =
-lib_LIBRARIES =
+lib_LTLIBRARIES =
noinst_HEADERS =
TESTS =
XFAIL_TESTS =
@@ -37,11 +37,9 @@ AM_LIBS =
AM_CXXFLAGS = $(AM_CFLAGS)
-lib_LIBRARIES += src/libtriton.a
-src_libtriton_a_SOURCES =
-lib_LIBRARIES += src/libasg.a
-src_libasg_a_SOURCES =
-LDADD = src/libtriton.a src/libasg.a
+lib_LTLIBRARIES += src/libtriton.la
+src_libtriton_la_SOURCES =
+LDADD = src/libtriton.la
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = maint/triton.pc
@@ -62,7 +60,6 @@ include $(top_srcdir)/src/common/Makefile.subdir
include $(top_srcdir)/src/zeroconf/Makefile.subdir
#include $(top_srcdir)/src/transactional-osd/Makefile.subdir
include $(top_srcdir)/src/remote/Makefile.subdir
-include $(top_srcdir)/src/replicated-osd/Makefile.subdir
include $(top_srcdir)/src/asg/Makefile.subdir
include $(top_srcdir)/src/server/Makefile.subdir
include $(top_srcdir)/src/admin-tools/Makefile.subdir
diff --git a/code/bindings/Makefile.subdir b/code/bindings/Makefile.subdir
index 95d2f70..0ace217 100644
--- a/code/bindings/Makefile.subdir
+++ b/code/bindings/Makefile.subdir
@@ -1,9 +1,15 @@
# hand-written dependencies for now
# TODO : figure out better way to do this
java_proj_dir=bindings/java/asg-triton-java
-resource_dir=$(java_proj_dir)/src/main/resources/META-INF
+resource_dir=$(java_proj_dir)/src/main/resources
+
+# Don't even try - SWIG doesn't have gcc/clang-specific preprocessor directives
+# (include_next). Keeping for posterity
+#SWIG_CPPFLAGS = $(shell CC=$(CC) $(srcdir)/maint/swig-cppflags.sh $(srcdir)/include/asg.h)
+
+SWIG_CMD = \
+ $(SWIG) $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS)
-SWIG_CMD = $(SWIG) $(AM_CPPFLAGS) $(CPPFLAGS)
bindings/java/asg-java.c.d: $(srcdir)/bindings/asg.i
$(AM_V_GEN)$(SWIG_CMD) \
-o $@ -MM -MT bindings/java/asg-java.c $<
@@ -30,4 +36,6 @@ SWIG_JAVA_CFLAGS = \
# java bindings has A LOT of warnings
bindings/java/asg-java.$(OBJEXT) : CFLAGS += $(SWIG_JAVA_CFLAGS)
-src_libasg_a_SOURCES += bindings/java/asg-java.c
+# libtool...
+bindings/java/asg-java.lo : CFLAGS += $(SWIG_JAVA_CFLAGS)
+src_libtriton_la_SOURCES += bindings/java/asg-java.c
diff --git a/code/bindings/README b/code/bindings/README
new file mode 100644
index 0000000..351671d
--- /dev/null
+++ b/code/bindings/README
@@ -0,0 +1,8 @@
+= Requirements
+
+We use the SWIG interface generator (http://www.swig.org/) to generate
+bindings. We test for version 3 or greater, though earlier versions may work
+as well.
+
+For binding-specific requirements and instructions, see the individual bindings
+directories.
diff --git a/code/bindings/asg.i b/code/bindings/asg.i
index 08c8d79..c29898b 100644
--- a/code/bindings/asg.i
+++ b/code/bindings/asg.i
@@ -1,8 +1,98 @@
%module asg
+%import "cpointer.i"
+%import "carrays.i"
+%import "java/arrays_java.i"
+
+/* fix up default 32 bit C long-> java int mapping (assuming we're using a
+ * 64-bit jvm) */
+%apply long long {long}
+%apply unsigned long long {unsigned long}
+
+%apply long {long int, long long int}
+%apply unsigned long {unsigned long int, unsigned long long int}
+
+/* hack to propagate constants */
+#ifndef UINT64_MAX
+#define UINT64_MAX -1ull
+#endif
+
%{
/* Includes the header in the wrapper code */
#include "asg.h"
%}
+/* unfortunately we can't parse system headers the way we'd like to, so gotta
+ * hand-define these types */
+%apply unsigned long { intptr_t, uint64_t }
+
+/* apply this before the conversion functions */
+%typemap(in, numinputs=0) JNIEnv *env "$1 = jenv;"
+
+%javamethodmodifiers arr2voidb "private"
+%javamethodmodifiers freearrb "private"
+/* conversion byte arrays <-> void *'s */
+%inline %{
+#include <stdint.h>
+
+jlong arr2voidb(JNIEnv *env, jbyteArray arr) {
+ void *ptr = (*env)->GetByteArrayElements(env, arr, NULL);
+ return (intptr_t) ptr;
+}
+void freearrb(JNIEnv *env, jbyteArray arr, jlong map) {
+ void *ptr = 0;
+ ptr = *(void**)↦
+ (*env)->ReleaseByteArrayElements(env, arr, ptr, JNI_ABORT);
+}
+%}
+
+JAVA_ARRAYS_DECL(signed char, jbyte, Byte, Schar)
+JAVA_ARRAYS_IMPL(signed char, jbyte, Byte, Schar)
+JAVA_ARRAYS_TYPEMAPS(signed char, byte, jbyte, Schar, "[B")
+/*JAVA_ARRAYS_DECL(signed char, jbyte, Byte, Byte)*/
+/*JAVA_ARRAYS_IMPL(signed char, jbyte, Byte, Byte)*/
+/*JAVA_ARRAYS_TYPEMAPS(signed char, byte, jbyte, Byte, "[B")*/
+
+/* asg only uses void*'s as arrays of bytes, so we can represent them
+ * directly */
+%apply signed char[] { void * }
+/*%typemap(jstype) void * "byte[]"*/
+/*%typemap(javain,pre=" long tmp$javainput = arr2voidb($javainput);",post=" freearrb($javainput, tmp$javainput);") const void * "tmp$javainput"*/
+
+%inline %{
+/* allow create/destroy/get of asg instances (but not modification) */
+static asg_instance_t* new_asg_instance() {
+ return (asg_instance_t*) calloc(1, sizeof(asg_instance_t));
+}
+static void delete_asg_instance(asg_instance_t *a) {
+ if (a) free(a);
+}
+static asg_instance_t asg_instance_value(asg_instance_t *a) {
+ return *a;
+}
+%}
+
+/* allow modifying asg_size_t's */
+%pointer_functions(asg_size_t, asg_size);
+%pointer_functions(asg_update_id_t, asg_update_id);
+
+/* allow creating arrays of *_info_t's */
+%array_functions(asg_record_info_t, asg_record_info);
+%array_functions(asg_container_info_t, asg_container_info);
+%array_functions(asg_object_info_t, asg_object_info);
+%array_functions(asg_fork_info_t, asg_fork_info);
+
+/* get rid of ugly asg.asg_* functions in the java code */
+%rename(initialize) asg_initialize;
+%rename(finalize) asg_finalize;
+%rename(read_one) asg_read_one;
+%rename(read_sequence) asg_read_sequence;
+%rename(write) asg_write;
+%rename(punch) asg_punch;
+%rename(reset) asg_reset;
+%rename(probe_system) asg_probe_system;
+%rename(probe_container) asg_probe_container;
+%rename(probe_object) asg_probe_object;
+%rename(probe_fork) asg_probe_fork;
+
/* Parse the header file to generate wrappers */
%include "asg.h"
diff --git a/code/bindings/java/README b/code/bindings/java/README
new file mode 100644
index 0000000..8b21fec
--- /dev/null
+++ b/code/bindings/java/README
@@ -0,0 +1,37 @@
+= Requirements
+
+* JNI headers, which are provided by java -dev packages in your favorite Linux
+ distro (or macports/homebrew/fink for OSX users). Should work with most any
+ version of Java.
+* Apache Maven (https://maven.apache.org/)
+
+= Instructions
+
+* The java bindings require linking against dynamic libraries. Currently, all
+ dependency libraries need to be available as dynamic libraries to
+ successfully run the java client, except for the three local-storage
+ libraries (recordstore, idb, hoss).
+* Run configure with --enable-java-bindings and --enable-shared (setting the
+ SWIG environment variable if necessary).
+* After 'make [install]', bindings will be generated to
+ $(builddir)/bindings/java/asg-triton-java as an Maven project. cd there and
+ run 'mvn install', which will install the project (as a jar) to your local
+ Maven repository.
+* Be sure to run 'make install' before running java applications using the
+ bindings - at this time, the library path used in the lookup is fixed to the
+ $(libdir) directory.
+
+= Notes
+
+Currently, the binding-generated files aren't well-integrated with the build
+system. If you are building in a *separate directory* and have the need to
+clean up and rebuild (e.g., through significantly changing the asg.i file or
+adding utilities to non-interface java code), the following commands can be
+used:
+
+rm -r bindings/java/asg-triton-java
+(if asg.i is unchanged) touch $(srcdir)/bindings/asg.i
+./config.status cp-java-proj
+make
+
+Again, DO NOT do this if doing an in-tree build.
diff --git a/code/bindings/java/asg-triton-java/pom.xml b/code/bindings/java/asg-triton-java/pom.xml
index dda7fc5..ab8b974 100644
--- a/code/bindings/java/asg-triton-java/pom.xml
+++ b/code/bindings/java/asg-triton-java/pom.xml
@@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>gov.mcs.anl.asg</groupId>
+ <groupId>gov.anl.mcs.asg</groupId>
<artifactId>asg-triton-java</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
diff --git a/code/bindings/java/asg-triton-java/src/main/java/gov/anl/mcs/asg/AsgTritonBootstrap.java b/code/bindings/java/asg-triton-java/src/main/java/gov/anl/mcs/asg/AsgTritonBootstrap.java
index 749ee1c..299ab4d 100644
--- a/code/bindings/java/asg-triton-java/src/main/java/gov/anl/mcs/asg/AsgTritonBootstrap.java
+++ b/code/bindings/java/asg-triton-java/src/main/java/gov/anl/mcs/asg/AsgTritonBootstrap.java
@@ -8,23 +8,26 @@ package gov.anl.mcs.asg;
import java.util.Properties;
import java.io.InputStream;
+import java.io.File;
+/* TODO: unfortunately, cannot set java.library.path at runtime (System
+ * properties are meant to be read-only). Thus, use the .so file name and lib
+ * path directly */
public final class AsgTritonBootstrap {
- final static String libname = "asg";
- final static String pathkey = "java.library.path";
- final static String rsc = "asg-triton.properties";
+ final static String libname = "libtriton.so";
+ final static String rsc = "/asg-triton.properties";
+ final static String propname = "asg.triton.lib.loc";
- static void loadLib()
- throws java.io.IOException, java.lang.NullPointerException {
- InputStream is =
- ClassLoader.getSystemResourceAsStream("asg-triton.properties");
+ public static void loadLib() throws java.io.IOException {
+ InputStream is = AsgTritonBootstrap.class.getResourceAsStream(rsc);
+ if (is == null) {
+ throw new java.io.IOException("Unable to read resource " + rsc);
+ }
Properties p = new Properties();
p.load(is);
- Properties sysprop = System.getProperties();
- System.setProperty(pathkey, System.getProperty(pathkey) + ":" +
- p.getProperty("asg.triton.lib.loc"));
- System.loadLibrary(libname);
+ String lib = p.getProperty(propname) + File.separator + libname;
+ System.load(lib);
}
// disable construction of this object - only used for loading the triton
diff --git a/code/bindings/java/asg-triton-java/src/main/resources/META-INF/.dummy b/code/bindings/java/asg-triton-java/src/main/resources/.dummy
similarity index 100%
rename from code/bindings/java/asg-triton-java/src/main/resources/META-INF/.dummy
rename to code/bindings/java/asg-triton-java/src/main/resources/.dummy
diff --git a/code/configure.ac b/code/configure.ac
index a40f940..9f0e4a9 100755
--- a/code/configure.ac
+++ b/code/configure.ac
@@ -8,8 +8,13 @@ AC_CANONICAL_TARGET
AC_CANONICAL_SYSTEM
AC_CANONICAL_HOST
+AC_CONFIG_MACRO_DIR([m4])
+
AM_INIT_AUTOMAKE([foreign subdir-objects -Wall])
+LT_PREREQ([2.2])
+LT_INIT()
+
# we should remove this soon, only needed for automake 1.10 and older
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -21,7 +26,6 @@ AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_CXXCPP
-AC_PROG_RANLIB
AC_PROG_MKDIR_P
@@ -38,7 +42,14 @@ dnl
dnl Verify pkg-config
dnl
PKG_PROG_PKG_CONFIG
-PKG_CONFIG="pkg-config --static"
+
+dnl notes:
+dnl -D__TRITON_POSIX_LOCKING__ makes sure that POSIX (i.e. pthread) locking
+dnl is enabled in c-utils header files included by Triton
+dnl -DDB_DBM_HSEARCH=0 silences a potential warning in db.h for some
+dnl versions of Berkeley DB
+CPPFLAGS="$CPPFLAGS -I$srcdir -I$srcdir/include -I. -D__TRITON_POSIX_LOCKING__ -DDB_DBM_HSEARCH=0"
+CFLAGS="$CFLAGS -I$srcdir -I$srcdir/include -I. -D__TRITON_POSIX_LOCKING__ -DDB_DBM_HSEARCH=0"
dnl
dnl Use pkgconfig to find libconfuse
@@ -46,18 +57,18 @@ dnl - Sets CONFUSE_CFLAGS, CONFUSE_LIBS
PKG_CHECK_MODULES([CONFUSE],[libconfuse], [],
[AC_MSG_ERROR([Could not find working libconfuse installation!])])
-LIBS="$CONFUSE_LIBS $LIBS"
-CFLAGS="$CONFUSE_CFLAGS $CFLAGS"
+LIBS="$LIBS $CONFUSE_LIBS"
+CFLAGS="$CFLAGS $CONFUSE_CFLAGS"
dnl unfortunately pkg-config doesn't separate cppflags/cflags
-CPPFLAGS="$CONFUSE_CPPFLAGS $CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $CONFUSE_CPPFLAGS"
PKG_CHECK_MODULES([AESOP], [aesop], [],
[AC_MSG_ERROR([Could not find working aesop installation!])])
-LIBS="$AESOP_LIBS $LIBS"
-CPPFLAGS="$AESOP_CFLAGS $CPPFLAGS"
-CFLAGS="$AESOP_CFLAGS $CFLAGS"
+LIBS="$LIBS $AESOP_LIBS"
+CPPFLAGS="$CPPFLAGS $AESOP_CFLAGS"
+CFLAGS="$CFLAGS $AESOP_CFLAGS"
dnl Find aecc wrapper
PKG_CHECK_VAR([AECC_PREFIX],[aesop], [exec_prefix])
@@ -66,9 +77,9 @@ AC_SUBST(AECC)
PKG_CHECK_MODULES_STATIC([MERCURY],[mercury],[],
[AC_MSG_ERROR([Could not find working mercury installation!])])
-LIBS="$MERCURY_LIBS $LIBS"
-CPPFLAGS="$MERCURY_CFLAGS $CPPFLAGS"
-CFLAGS="$MERCURY_CFLAGS $CFLAGS"
+LIBS="$LIBS $MERCURY_LIBS"
+CPPFLAGS="$CPPFLAGS $MERCURY_CFLAGS"
+CFLAGS="$CFLAGS $MERCURY_CFLAGS"
# TODO: the mercury tests should probably be in their own .m4
# make sure that mercury has boost preprocessors enabled
@@ -130,29 +141,21 @@ dnl - Sets C_UTILS_CFLAGS, C_UTILS_LIBS
dnl ====================================================
PKG_CHECK_MODULES([C_UTILS],[c-utils], [],
[AC_MSG_ERROR([Could not find working c-utils installation!])])
-LIBS="$C_UTILS_LIBS $LIBS"
-CFLAGS="$C_UTILS_CFLAGS $CFLAGS"
+LIBS="$LIBS $C_UTILS_LIBS"
+CFLAGS="$CFLAGS $C_UTILS_CFLAGS"
dnl unfortunately pkg-config doesn't separate cppflags/cflags
-CPPFLAGS="$C_UTILS_CPPFLAGS $CPPFLAGS"
-
-dnl notes:
-dnl -D__TRITON_POSIX_LOCKING__ makes sure that POSIX (i.e. pthread) locking
-dnl is enabled in c-utils header files included by Triton
-dnl -DDB_DBM_HSEARCH=0 silences a potential warning in db.h for some
-dnl versions of Berkeley DB
-CPPFLAGS="$CPPFLAGS -I$srcdir -I$srcdir/include -I. -D__TRITON_POSIX_LOCKING__ -DDB_DBM_HSEARCH=0"
-CFLAGS="$CFLAGS -I$srcdir -I$srcdir/include -I. -D__TRITON_POSIX_LOCKING__ -DDB_DBM_HSEARCH=0"
+CPPFLAGS="$CPPFLAGS $C_UTILS_CPPFLAGS"
dnl link in sos storage component
PKG_CHECK_MODULES([HOSS],[hoss], [],
[AC_MSG_ERROR([Could not find working HOSS installation!])])
-LIBS="$HOSS_LIBS $LIBS"
-CPPFLAGS="$HOSS_CFLAGS $CPPFLAGS"
+LIBS="$LIBS $HOSS_LIBS"
+CPPFLAGS="$CPPFLAGS $HOSS_CFLAGS"
dnl Bindings-related options
AC_ARG_ENABLE(java-bindings,
-[ --enable-java-bindings Build java bindings. Requires SWIG.],
+[ --enable-java-bindings Build java bindings. Requires SWIG and --enable-shared.],
[case "${enableval}" in
yes) java_bindings=true ;;
no) java_bindings=false ;;
@@ -162,12 +165,19 @@ AC_ARG_ENABLE(java-bindings,
AM_CONDITIONAL([JAVA_BINDINGS], [test "$java_bindings" = "true"])
+AC_ARG_VAR([SWIG], [swig interface generator executable])
# check for swig and jni only if we're trying to build java bindings
if test "$java_bindings" = "true" ; then
+ AC_MSG_CHECKING([if shared library enabled for java bindings])
+ if test "x$enable_shared" = "xno" ; then
+ AC_MSG_ERROR([Shared libraries required for java bindings. Reconfigure with --enable-shared])
+ fi
+ AC_MSG_CHECKING([for JNI headers])
AX_JNI_INCLUDE_DIR
for jni_include_dir in $JNI_INCLUDE_DIRS ; do
CPPFLAGS="$CPPFLAGS -I$jni_include_dir"
done
+ AC_MSG_CHECKING([for SWIG])
AX_PKG_SWIG([3.0.0], [], [AC_MSG_ERROR([SWIG is required to generate bindings.])])
fi
diff --git a/code/include/asg.h b/code/include/asg.h
index 754b061..59fdc94 100644
--- a/code/include/asg.h
+++ b/code/include/asg.h
@@ -136,24 +136,24 @@ typedef uint64_t asg_update_id_t;
* wish to specify the storage location for the object. The storage system
* is free to choose the location.
*/
-#define ASG_LOCATION_AUTO 0
+#define ASG_LOCATION_AUTO 0ul
/** Special value for asg_record_id_t to indicate a null or unspecified
* record.
*/
-#define ASG_RECORD_NULL 0
+#define ASG_RECORD_NULL 0ul
/** Special value for asg_fork_id_t to indicate a null or unspecified
* record.
*/
-#define ASG_FORK_NULL 0
+#define ASG_FORK_NULL 0ul
/** Special value for asg_object_id_t to indicate a null or unspecified
* record.
*/
-#define ASG_OBJECT_NULL 0
+#define ASG_OBJECT_NULL 0ul
/** Special value for asg_object_id_t to indicate a null or unspecified
* container.
*/
-#define ASG_CONTAINER_NULL 0
+#define ASG_CONTAINER_NULL 0ul
/**
* Return/error codes
@@ -166,6 +166,7 @@ typedef enum
ASG_ERR_NOENT = 3, /**< entity does not exist */
ASG_ERR_BUFFER_SMALL = 4, /**< buffer too small to hold data */
ASG_ERR_RECORDLEN_INVAL = 5, /**< invalid record length */
+ ASG_ERR_INVAL = 6, /**< invalid arguments */
ASG_ERR_OTHER = 54321 /**< all other failure modes */
} asg_ret_t;
diff --git a/code/maint/depend-ae.sh b/code/maint/depend-ae.sh
index 70dbdd3..37f0cb0 100755
--- a/code/maint/depend-ae.sh
+++ b/code/maint/depend-ae.sh
@@ -14,4 +14,4 @@ shift
if [ -n "$DIR" ] ; then
DIR="$DIR"/
fi
-exec $CC -x c -M -MM -MG $CPPFLAGS $CFLAGS $1 | sed -e "s@^\(.*\)\.o:@$DIR\1.d $DIR\1.o :@"
+exec $CC -x c -M -MM -MG $CPPFLAGS $CFLAGS $1 | sed -e "s@^\(.*\)\.o:@$DIR\1.d $DIR\1.lo :@"
diff --git a/code/maint/swig-cppflags.sh b/code/maint/swig-cppflags.sh
new file mode 100755
index 0000000..238c0b0
--- /dev/null
+++ b/code/maint/swig-cppflags.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# NOTE: This is no longer used, but I'm holding onto it for posterity...
+# The idea was to get the include paths and #defines used by the compiler to
+# feed to swig in order to parse system headers, but unfortunately the system
+# headers use non-standard preprocessor directives that swig can't handle
+# (include_next). This script itself works perfectly fine, though.
+
+if [[ "$#" == 0 ]] ; then
+ echo "Usage: swig-cppflags.sh [FILE...]" >&2
+ exit 1
+fi
+
+# TODO: options have been confirmed to work on recent versions of both gcc and
+# clang - later on, should at least add a check to ensure it works
+
+if [[ "$#" -gt 0 ]] ; then
+ #generate the dummy file to include
+ testfile=$(mktemp)
+ for include in $@ ; do
+ echo -e "#include \"$include\"" >>$testfile
+ done
+
+ # preprocess and grab the paths used to get headers, printing to stdout
+ ${CC} -E -H -x c $testfile 2>&1 >/dev/null \
+ | awk '{ if (substr($1, 0, 1) == ".") print $2 }' \
+ | xargs -L 1 dirname \
+ | awk '{ print "-I" $1 }'
+
+ err=$?
+
+ rm $testfile
+
+ if [[ $err != 0 ]] ; then
+ echo "header path gather failed with code $err, exiting" >&2
+ exit 1
+ fi
+fi
+
+# generate all defines used by default, printing to stdout
+${CC} -dM -E - < /dev/null \
+ | sed "/__STDC__/ d" \
+ | awk '{ if (NF < 3) print "-D" $2; else print "-D\"" $2 "=" $3 "\""; }'
+
+
+set +e
diff --git a/code/src/asg/Makefile.subdir b/code/src/asg/Makefile.subdir
index b916d32..b119d3f 100644
--- a/code/src/asg/Makefile.subdir
+++ b/code/src/asg/Makefile.subdir
@@ -1,4 +1,4 @@
-src_libtriton_a_SOURCES += \
+src_libtriton_la_SOURCES += \
src/asg/asg.c \
src/asg/asg-triton-ext.c \
src/asg/asg-internal.ae \
diff --git a/code/src/asg/asg-internal.ae b/code/src/asg/asg-internal.ae
index c11cbdf..415cddf 100644
--- a/code/src/asg/asg-internal.ae
+++ b/code/src/asg/asg-internal.ae
@@ -34,6 +34,21 @@ void asg_callback (void *user_ptr, int ret)
return;
}
+static uint32_t convert_flags_to_rosd(asg_flags_t flags) {
+ switch (flags) {
+ case ASG_COND_NONE: /* ASG_COND_UNCONDITIONAL currently the same */
+ return ROSD_COND_UNCONDITIONAL;
+ case ASG_COND_UNTIL: /* currently unsupported */
+ return -1;
+ case ASG_COND_ALL:
+ return ROSD_COND_ALL;
+ case ASG_AUTO_UPDATE_ID: /* currently unsupported */
+ return -1;
+ default: /* unknown flags */
+ return -1;
+ }
+}
+
/**
* should initialize all the server name and their address
* first step, use options as the server address we want to connect
@@ -112,21 +127,12 @@ __blocking int asg_i_write (
asg_size_t * transferred)
{
triton_ret_t tret;
+ int aret;
+
+ uint32_t rosd_flags;
const char * replication_factor_env;
uint32_t replication_factor;
- //build oid and get server info from it;
-
- /**
- * last two args are: uint64_t txn_number, uint32_t flags;
- * remote_triton_rpc_rosd_write does not provide the ability to check
- * whether current condition satisfy the 'version_condition', we need to
- * implement it before calling write function.
-
- printf("oid is %s\n", triton_uint128_to_string(oid));
- printf("fork_id: %ld\n", (uint64_t)fork_id);
- printf("data: %s, has %d lengh with new version: %ld with flag:%d\n", data, recordlen, (uint64_t)new_version, flags);
- */
/* hack: use environment variable to control the replication factor */
replication_factor = 0;
@@ -138,21 +144,31 @@ __blocking int asg_i_write (
}
}
- tret = remote_triton_rpc_rosd_write(container, object, fork,
- start_record, recordcount, recordlen, data, flags, version_condition,
- new_version, replication_factor);
+ rosd_flags = convert_flags_to_rosd(flags);
+ if (rosd_flags == -1) {
+ return ASG_ERR_INVAL;
+ }
- if (triton_is_error(tret))
+ tret = remote_triton_rpc_rosd_write(container, object, fork,
+ start_record, recordcount, recordlen, data,
+ rosd_flags, version_condition, new_version,
+ replication_factor);
+
+ if (triton_error_equal(tret, TRITON_ERR_CONDITIONAL))
+ aret = ASG_ERR_UPDATE_ID;
+ else if (triton_is_error(tret))
{
triton_error_print(tret, "remote_triton_rpc_rosd_write ");
triton_error_destroy(tret);
- return(ASG_ERR_OTHER);
+ aret = ASG_ERR_OTHER;
+ }
+ else {
+ *transferred = recordcount * recordlen;
+ aret = ASG_SUCCESS;
}
- triton_error_destroy(tret);
-
- *transferred = recordcount * recordlen;
- return(ASG_SUCCESS);
+ triton_error_destroy(tret);
+ return aret;
}
__blocking int asg_i_read_sequence (
@@ -172,9 +188,15 @@ __blocking int asg_i_read_sequence (
triton_ret_t tret;
int ret = ASG_SUCCESS;
struct rosd_record_info rinfo;
+ uint32_t rosd_flags;
if (instance!=1) return ASG_ERR_OTHER;
+ rosd_flags = convert_flags_to_rosd(flags);
+ if (rosd_flags == -1 || rosd_flags == ROSD_COND_AUTO) {
+ return ASG_ERR_INVAL;
+ }
+
tret = remote_triton_rpc_rosd_read_sequence(
(uint64_t)container,
(uint64_t)object,
@@ -182,12 +204,14 @@ __blocking int asg_i_read_sequence (
(uint64_t)record_start,
(uint64_t)record_count,
(uint64_t)record_expected_len,
- (uint32_t)flags,
+ rosd_flags,
(uint64_t)update_id_condition,
buf,
&rinfo);
- if (triton_is_error(tret)) {
+ if (triton_error_equal(tret, TRITON_ERR_CONDITIONAL))
+ ret = ASG_ERR_UPDATE_ID;
+ else if (triton_is_error(tret)) {
/* TODO: do we really want _print fns in the library? */
triton_error_print(tret, "remote_triton_rpc_rosd_read_sequence");
ret = ASG_ERR_OTHER;
@@ -222,13 +246,19 @@ __blocking int asg_i_read_one (
uint64_t record_len;
uint64_t record_update_id;
int ret;
+ uint32_t rosd_flags;
+
+ rosd_flags = convert_flags_to_rosd(flags);
+ if (rosd_flags == -1 || rosd_flags == ROSD_COND_AUTO) {
+ return ASG_ERR_INVAL;
+ }
tret = remote_triton_rpc_rosd_read_one(
container,
object,
fork,
record,
- flags,
+ rosd_flags,
update_id_condition,
buf,
buf_size,
diff --git a/code/src/common/Makefile.subdir b/code/src/common/Makefile.subdir
index 4630801..66453d4 100644
--- a/code/src/common/Makefile.subdir
+++ b/code/src/common/Makefile.subdir
@@ -1,4 +1,4 @@
-src_libtriton_a_SOURCES += \
+src_libtriton_la_SOURCES += \
src/common/node.c \
src/common/node.h \
src/common/triton-error-defs.c \
@@ -24,7 +24,8 @@ BUILT_SOURCES += \
src/common/triton-error-decls.h \
src/common/triton-error-defs.c \
src/common/triton-debug-decls.h \
- src/common/triton-debug-defs.c
+ src/common/triton-debug-defs.c \
+ src/common/resources/signal/signal.h
AE_SRC += \
src/common/resources/signal/signal.ae \
diff --git a/code/src/placement/Makefile.subdir b/code/src/placement/Makefile.subdir
index 9ee4392..932fe53 100644
--- a/code/src/placement/Makefile.subdir
+++ b/code/src/placement/Makefile.subdir
@@ -1,4 +1,4 @@
-src_libtriton_a_SOURCES += \
+src_libtriton_la_SOURCES += \
src/placement/placement.ae \
src/placement/placement.h \
src/placement/placement-1d.c \
diff --git a/code/src/remote/Makefile.subdir b/code/src/remote/Makefile.subdir
index 1e87ced..47b2417 100644
--- a/code/src/remote/Makefile.subdir
+++ b/code/src/remote/Makefile.subdir
@@ -1,4 +1,4 @@
-src_libtriton_a_SOURCES += \
+src_libtriton_la_SOURCES += \
src/remote/core-rpc.ae \
src/remote/core-rpc.hae \
src/remote/mercury-engine.ae \
@@ -8,6 +8,9 @@ src_libtriton_a_SOURCES += \
src/remote/mercury-rsc.hae \
src/remote/mercury-rsc.c
+BUILT_SOURCES += \
+ src/remote/mercury-rsc.h
+
AE_SRC += \
src/remote/core-rpc.ae \
src/remote/mercury-engine.ae
diff --git a/code/src/replicated-osd/Makefile.subdir b/code/src/replicated-osd/Makefile.subdir
index 2b5ead2..409bdd6 100644
--- a/code/src/replicated-osd/Makefile.subdir
+++ b/code/src/replicated-osd/Makefile.subdir
@@ -1,5 +1,5 @@
# TODO: temporary
-src_libtriton_a_SOURCES += \
+src_libtriton_la_SOURCES += \
src/replicated-osd/rosd-util.ae \
src/replicated-osd/rosd-txn-nr-cache.ae \
src/replicated-osd/rosd-internal.hae \
@@ -38,17 +38,3 @@ AE_HDR += \
src/replicated-osd/rosd-internal.hae \
src/replicated-osd/rosd.hae \
src/replicated-osd/buffer-mgmt.hae
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/code/src/replicated-osd/rosd-internal.hae b/code/src/replicated-osd/rosd-internal.hae
index 76ebdd3..0302e78 100644
--- a/code/src/replicated-osd/rosd-internal.hae
+++ b/code/src/replicated-osd/rosd-internal.hae
@@ -7,6 +7,7 @@
*/
#include "src/replicated-osd/rosd.hae"
+#include "hoss.hae"
/* default replication level for objects (set via zeroconf) */
extern uint32_t rosd_default_replication_factor;
@@ -14,6 +15,9 @@ extern uint32_t rosd_default_replication_factor;
/* default fork used to store replication factor in object */
#define REP_FACTOR_FORK UINT64_MAX
+/* helper function to convert rosd conditionals into hoss conditionals */
+hoss_flags_t rosd_convert_flags_to_hoss(uint32_t flags);
+
triton_ret_t triton_oid_to_addrs(
uint64_t oid,
uint32_t replication_factor,
diff --git a/code/src/replicated-osd/rosd-read.ae b/code/src/replicated-osd/rosd-read.ae
index e174d3c..de5e2f0 100644
--- a/code/src/replicated-osd/rosd-read.ae
+++ b/code/src/replicated-osd/rosd-read.ae
@@ -180,7 +180,7 @@ __blocking triton_ret_t remote_triton_rpc_rosd_read_one(
uint64_t update_id_condition,
void * buf,
size_t buf_size,
- uint64_t record_len,
+ uint64_t * record_len,
uint64_t * record_update_id) {
triton_rpc_rosd_read_one_in_t in;
@@ -209,6 +209,11 @@ __blocking triton_ret_t remote_triton_rpc_rosd_read_one(
tret = triton_error_dup(out.tret);
+ if (!triton_is_error(tret)) {
+ *record_len = out.record_len;
+ *record_update_id = out.record_update_id;
+ }
+
triton_mercury_addr_free(addr);
HG_Free_output(handle, &out);
HG_Destroy(handle);
@@ -240,6 +245,8 @@ static __blocking triton_ret_t rosd_read_one_local_storage(
hoss_size_t nrecs;
hoss_update_t update_info;
struct hoss_record_info rec_info;
+ hoss_flags_t hoss_flags;
+ int do_commit;
soid.nids = 3;
soid.ids = soid_eids;
@@ -247,6 +254,13 @@ static __blocking triton_ret_t rosd_read_one_local_storage(
soid_eids[1] = object;
soid_eids[2] = fork;
+ hoss_flags = rosd_convert_flags_to_hoss(flags);
+ if (hoss_flags == -1) {
+ triton_error_msg(
+ "invalid ROSD flags passed in (should be caught earlier)\n");
+ return TRITON_ERR_INVAL;
+ }
+
/* TODO: handle canceled error code (or whatever hoss will report to
* indicate that a txn failed and should be retried)
*/
@@ -254,26 +268,42 @@ static __blocking triton_ret_t rosd_read_one_local_storage(
if(ret != 0)
return(TRITON_ERR_IO);
- ret = hoss_read(&soid, record, 1, HOSS_NONE, update_id_condition, buf,
- buf_sz, &rec_info, 1, grp, &nbytes, &nrecs, &update_info,
+ ret = hoss_read(&soid, record, 1, hoss_flags, update_id_condition, buf,
+ buf_sz, &rec_info, 1, grp, record_len, &nrecs, &update_info,
&hoss_rc);
+ do_commit = 0;
if (ret != 0)
tret = TRITON_ERR_IO;
/* check for short buffer */
+ else if (hoss_rc == HOSS_ECONDFAIL) {
+ /* TODO: have to "commit" here, else hoss/idb segfaults */
+ tret = TRITON_ERR_CONDITIONAL;
+ do_commit = 1;
+ }
else if (hoss_rc == ENOSPC) {
+ /* TODO: this also requires a "commit"? */
tret = TRITON_ERR_RECV_TOO_SMALL;
+ do_commit = 1;
}
/* check for other io errors */
else if (hoss_rc != 0)
tret = TRITON_ERR_IO;
/* check for nonexistent record */
- else if (nrecs == 0)
+ else if (nrecs == 0) {
+ /* TODO: this also requires a "commit"? */
+ do_commit = 1;
tret = TRITON_ERR_NOENT;
- else
+ }
+ else {
tret = TRITON_SUCCESS;
+ *new_update_id = rec_info.update_id;
+ do_commit = 1;
+ }
- hoss_end(grp, 1);
+ ret = hoss_end(grp, do_commit);
+ if (ret != 0)
+ return TRITON_ERR_IO;
return tret;
}
@@ -297,6 +327,7 @@ static __blocking triton_ret_t rosd_read_sequence_local_storage(
int ret, hoss_rc;
hoss_size_t n_recs;
hoss_update_t update_info;
+ hoss_flags_t hoss_flags;
/* NOTE: we provide two hoss_record_info structs here. In normal
* operation we only expect 1 of them to be filled in. The second one
@@ -306,6 +337,13 @@ static __blocking triton_ret_t rosd_read_sequence_local_storage(
*/
struct hoss_record_info rec_array[2];
+ hoss_flags = rosd_convert_flags_to_hoss(flags);
+ if (hoss_flags == -1) {
+ triton_error_msg(
+ "invalid ROSD flags passed in (should be caught earlier)\n");
+ return TRITON_ERR_INVAL;
+ }
+
/* TODO: handle canceled error code (or whatever hoss will report to
* indicate that a txn failed and should be retried)
*/
@@ -321,15 +359,21 @@ static __blocking triton_ret_t rosd_read_sequence_local_storage(
soid_eids[1] = object;
soid_eids[2] = fork;
- ret = hoss_read(&soid, record_start, record_count, HOSS_NONE, update_id_condition, buffer, record_count*record_expected_len, rec_array, 2, grp, &nbytes, &n_recs, &update_info, &hoss_rc);
+ ret = hoss_read(&soid, record_start, record_count, hoss_flags, update_id_condition, buffer, record_count*record_expected_len, rec_array, 2, grp, &nbytes, &n_recs, &update_info, &hoss_rc);
/* check for fundamental I/O error */
- if(ret != 0 || hoss_rc != 0)
+ if(ret != 0)
{
- triton_error_msg("hoss_read() failure, return code %d\n", ret);
+ triton_error_msg("hoss_read() failure, return %d, hoss rc %d\n", ret,
+ hoss_rc);
hoss_end(grp, 0);
return(TRITON_ERR_IO);
}
+ else if (hoss_rc == HOSS_ECONDFAIL) {
+ /* TODO: currently have to "commit" - segfaults otherwise */
+ hoss_end(grp, 1);
+ return TRITON_ERR_CONDITIONAL;
+ }
/* check for unexpected record size */
if(n_recs == 2 || (n_recs ==1 && rec_array[0].reclen != record_expected_len))
{
@@ -352,6 +396,7 @@ static __blocking triton_ret_t rosd_read_sequence_local_storage(
{
assert(n_recs == 1);
*records_read = rec_array[0].nrecs;
+ *new_update_id = rec_array[0].update_id;
}
else
{
diff --git a/code/src/replicated-osd/rosd-write.ae b/code/src/replicated-osd/rosd-write.ae
index fb3c0f7..6985897 100644
--- a/code/src/replicated-osd/rosd-write.ae
+++ b/code/src/replicated-osd/rosd-write.ae
@@ -70,7 +70,8 @@ static __blocking triton_ret_t rosd_write_do_work(
int my_position,
uint64_t start_record,
uint64_t recordcount,
- triton_rpc_rosd_write_in_t* in);
+ triton_rpc_rosd_write_in_t* in,
+ uint64_t *new_update_id);
static __blocking triton_ret_t rosd_write_local_storage(
uint64_t container,
@@ -124,7 +125,8 @@ static __blocking triton_ret_t rosd_handle_write_segment(
triton_rpc_rosd_write_in_t* in,
uint64_t start_record,
int64_t remote_offset,
- uint64_t recordcount)
+ uint64_t recordcount,
+ uint64_t *new_update_id)
{
char *buffer;
triton_ret_t tret;
@@ -172,7 +174,8 @@ static __blocking triton_ret_t rosd_handle_write_segment(
my_position,
start_record,
recordcount,
- in);
+ in,
+ new_update_id);
buffer_mgmt_free(token);
@@ -184,7 +187,8 @@ static __blocking triton_ret_t rosd_write_run_pipeline(
na_addr_t src_addr,
na_addr_t next_addr,
int my_position,
- triton_rpc_rosd_write_in_t* in
+ triton_rpc_rosd_write_in_t* in,
+ uint64_t *new_update_id
)
{
int64_t current_remote_offset = 0;
@@ -192,6 +196,9 @@ static __blocking triton_ret_t rosd_write_run_pipeline(
triton_ret_t out_tret = TRITON_SUCCESS;
triton_mutex_t pipeline_mutex;
uint64_t records_per_buffer;
+ int is_update_id_set;
+ *new_update_id = 0;
+ is_update_id_set = 0;
triton_mutex_init(&pipeline_mutex, NULL);
@@ -211,6 +218,7 @@ static __blocking triton_ret_t rosd_write_run_pipeline(
pprivate uint64_t this_start_record;
pprivate int64_t this_remote_offset;
pprivate uint64_t this_recordcount;
+ pprivate uint64_t this_update_id;
/* One pbranch for pipeline depth. Each pbranch can be though of
* like a worker in a thread pool model.
@@ -260,13 +268,23 @@ static __blocking triton_ret_t rosd_write_run_pipeline(
in,
this_start_record,
this_remote_offset,
- this_recordcount);
+ this_recordcount,
+ &this_update_id);
triton_mutex_lock(&pipeline_mutex);
+ /* TODO: revisit update ID checking - everything should
+ * currently work its way to UINT64_MAX if there are any
+ * discrepencies */
if(triton_is_error(b_tret))
{
out_tret = b_tret;
}
+ else if (is_update_id_set &&
+ *new_update_id != this_update_id)
+ *new_update_id = ROSD_UPDATE_ID_MIXED;
+ else if (!is_update_id_set)
+ *new_update_id = this_update_id;
+
triton_mutex_unlock(&pipeline_mutex);
}
}
@@ -515,7 +533,6 @@ static __blocking triton_ret_t triton_rpc_rosd_write(hg_handle_t handle)
}
}
#else
- in.update_id_condition = 0;
#endif
if(my_position < (in.replication_factor-1))
@@ -526,7 +543,7 @@ static __blocking triton_ret_t triton_rpc_rosd_write(hg_handle_t handle)
triton_debug(triton_dbg_rosd, "rosd_write() triggered, running pipeline.\n");
out.tret = rosd_write_run_pipeline(handle, src_addr, next_addr, my_position,
- &in);
+ &in, &out.new_update_id);
#if 0
if(entry_p)
@@ -596,6 +613,7 @@ static __blocking triton_ret_t __remote_triton_rpc_rosd_write(
triton_mercury_run_rpc_with_bulk(addr, rpc_rosd_write_id, handle,
&in, &out, in.bulk_handle, 1, &data, &bulk_size, 0, HG_BULK_READ_ONLY);
+ *new_update_id = out.new_update_id;
tret = triton_error_dup(out.tret);
HG_Free_output(handle, &out);
@@ -610,12 +628,13 @@ static __blocking triton_ret_t rosd_write_do_work(
int my_position,
uint64_t start_record,
uint64_t recordcount,
- triton_rpc_rosd_write_in_t* in)
+ triton_rpc_rosd_write_in_t* in,
+ uint64_t *new_update_id)
{
triton_ret_t local_tret;
triton_ret_t remote_tret = TRITON_SUCCESS;
triton_ret_t tret;
- uint64_t new_update_id;
+ uint64_t new_update_id_local, new_update_id_remote;
/* right now only chained replication is supported */
assert(!(in->flags & ROSD_FLAG_FANOUT));
@@ -633,7 +652,7 @@ static __blocking triton_ret_t rosd_write_do_work(
remote_tret = __remote_triton_rpc_rosd_write(
next_addr, in->container, in->object, in->fork,
start_record, recordcount, in->recordlen, buffer,
- in->flags, in->update_id_condition, &new_update_id,
+ in->flags, in->update_id_condition, &new_update_id_remote,
my_position+1, in->replication_factor);
}
}
@@ -657,13 +676,14 @@ static __blocking triton_ret_t rosd_write_do_work(
recordcount,
in->recordlen,
buffer,
- 0,
+ in->flags,
in->update_id_condition,
- &new_update_id);
+ &new_update_id_local);
}
}
}
+
if(my_position < in->replication_factor-1)
tret = interpret_errors(local_tret, remote_tret, my_position,
is_usage_error_write, !in->expected_position);
@@ -671,6 +691,12 @@ static __blocking triton_ret_t rosd_write_do_work(
tret = interpret_error(local_tret, my_position, is_usage_error_write,
!in->expected_position);
+ /* TODO: proper error checking for this */
+ if (tret == TRITON_SUCCESS && my_position < in->replication_factor-1) {
+ assert(new_update_id_local == new_update_id_remote);
+ }
+ *new_update_id = new_update_id_local;
+
return(tret);
}
@@ -686,7 +712,8 @@ static int is_usage_error_write(triton_ret_t tret)
*/
if(triton_error_equal(tret, TRITON_ERR_NO_SERVERS) ||
triton_error_equal(tret, TRITON_ERR_NOENT) ||
- triton_error_equal(tret, TRITON_ERR_ACCES))
+ triton_error_equal(tret, TRITON_ERR_ACCES) ||
+ triton_error_equal(tret, TRITON_ERR_CONDITIONAL))
{
/* if there aren't enough servers to satisfy the replication
* request, or the object doesn't exist, or if
@@ -714,8 +741,9 @@ static __blocking triton_ret_t rosd_write_local_storage(
struct hoss_oid soid;
hoss_eid_t soid_eids[3];
hoss_size_t nbytes;
- hoss_update_t update_info;
+ hoss_update_t update_check, update_new;
int ret, hoss_rc;
+ hoss_flags_t hoss_flags;
/* TODO: handle canceled error code (or whatever hoss will report to
* indicate that a txn failed and should be retried)
@@ -723,6 +751,7 @@ static __blocking triton_ret_t rosd_write_local_storage(
ret = hoss_begin(&grp, NULL, HOSS_MSYNC|HOSS_ORDERED|HOSS_DEFERRED, g_hoss_ctx);
if(ret != 0)
{
+ triton_error_msg("hoss_begin() failure (write)\n");
return(TRITON_ERR_IO);
}
@@ -732,8 +761,24 @@ static __blocking triton_ret_t rosd_write_local_storage(
soid_eids[1] = object;
soid_eids[2] = fork;
+ /* convert and sanity check the flags */
+ hoss_flags = rosd_convert_flags_to_hoss(flags);
+ if (hoss_flags == -1) {
+ triton_error_msg(
+ "invalid ROSD flags passed in (should be caught earlier)\n");
+ return TRITON_ERR_INVAL;
+ }
+
+ /* TODO: what to do when no update id is given */
+ if (hoss_flags == HOSS_NONE)
+ update_new = 0;
+ else
+ update_new = update_id_condition;
+
/* TODO: the update id arguments probably aren't right here... */
- ret = hoss_write(&soid, start_record, recordcount, recordlen, HOSS_NONE, 0, update_id_condition, buffer, grp, &nbytes, &hoss_rc);
+ ret = hoss_write(&soid, start_record, recordcount, recordlen, hoss_flags,
+ update_new, update_new, buffer, grp, &nbytes,
+ &hoss_rc);
if(ret != 0)
{
triton_error_msg("hoss_write() failure, return code %d\n", ret);
@@ -742,19 +787,25 @@ static __blocking triton_ret_t rosd_write_local_storage(
}
ret = hoss_end(grp, 1);
- if(ret != 0)
+ if (ret == HOSS_ECONDFAIL)
+ return TRITON_ERR_CONDITIONAL;
+ else if(ret != 0)
{
+ triton_error_msg("hoss_end() failure (write), return code %d\n", ret);
return(TRITON_ERR_IO);
}
-
/* NOTE: output arguments to hoss_write (rc and nbytes) are not filled
* in until completion of hoss_end()
*/
- if(hoss_rc != 0 || nbytes != recordcount*recordlen)
+ else if(hoss_rc != 0 || nbytes != recordcount*recordlen)
{
triton_error_msg("hoss_write() failure or short write.\n");
return(TRITON_ERR_IO);
}
+
+ /* success - set update condition */
+ *new_update_id = update_new;
+
return(TRITON_SUCCESS);
}
diff --git a/code/src/replicated-osd/rosd.ae b/code/src/replicated-osd/rosd.ae
index d430b52..e2e6851 100644
--- a/code/src/replicated-osd/rosd.ae
+++ b/code/src/replicated-osd/rosd.ae
@@ -177,6 +177,24 @@ void triton_rpc_rosd_register(void)
return;
}
+/* TODO: don't have a hoss-equivalent for UNTIL or AUTO yet, AFAIK */
+/* TODO: not sure if HOSS_NONE usage is correct */
+hoss_flags_t rosd_convert_flags_to_hoss(uint32_t flags) {
+ switch (ROSD_COND_MASK(flags)) {
+ case ROSD_COND_UNCONDITIONAL:
+ return HOSS_NONE;
+ case ROSD_COND_UNTIL:
+ return -1;
+ case ROSD_COND_ALL:
+ return HOSS_COND_ALL;
+ case ROSD_COND_AUTO:
+ return -1;
+ default:
+ /* unknown flags */
+ return -1;
+ }
+}
+
triton_ret_t triton_oid_to_addrs(
uint64_t oid,
uint32_t replication_factor,
diff --git a/code/src/replicated-osd/rosd.hae b/code/src/replicated-osd/rosd.hae
index 58f2290..6d47f12 100644
--- a/code/src/replicated-osd/rosd.hae
+++ b/code/src/replicated-osd/rosd.hae
@@ -18,6 +18,7 @@
#define ROSD_FLAG_TRUNC_WRITE 4
/* to make writes conditional (provided version number must be strictly
* greater than current version number for the region in the object)
+ * NOTE: deprecated (currently unused in non-ancient revisions of triton
*/
#define ROSD_FLAG_COND_WRITE 8
/* set by master to tell replicas that this is expected to be the first
@@ -26,6 +27,24 @@
*/
#define ROSD_FLAG_FIRST_WRITE 16
+#define ROSD_FLAG_MAX 32
+
+#define ROSD_FLAG_MASK(x) (x & (ROSD_FLAG_MAX-1))
+#define ROSD_COND_MASK(x) (x & (~(ROSD_FLAG_MAX-1)))
+
+/* ROSD conditional operation flags (basically mirrors the ASG equivalents) */
+typedef enum {
+ /* no condition - version numbers unchanged (but still returned) */
+ ROSD_COND_UNCONDITIONAL = ROSD_FLAG_MAX,
+ /* read: read in order until finding a record with >= version number
+ * write/punch: update in order until finding a record with >= version
+ * number */
+ ROSD_COND_UNTIL = (ROSD_FLAG_MAX << 1),
+ /* read/write: commit if *all* records in range have version #s strictly
+ * smaller than the provided */
+ ROSD_COND_ALL = (ROSD_FLAG_MAX << 2),
+ ROSD_COND_AUTO = (ROSD_FLAG_MAX << 3)
+} rosd_cond_flags_t;
/* special values */
/* TODO: how to sync these with ASG equivalents cleanly? */
@@ -104,7 +123,7 @@ __blocking triton_ret_t remote_triton_rpc_rosd_read_one(
uint64_t update_id_condition,
void * buf,
size_t buf_size,
- uint64_t record_len,
+ uint64_t * record_len,
uint64_t * record_update_id);
__blocking triton_ret_t rosd_pipeline_setup_one_buffer(
diff --git a/code/src/server/Makefile.subdir b/code/src/server/Makefile.subdir
index a2d4eab..6d682ec 100644
--- a/code/src/server/Makefile.subdir
+++ b/code/src/server/Makefile.subdir
@@ -3,4 +3,3 @@ bin_PROGRAMS += \
src/server/triton-server
AE_SRC += src/server/triton-server.ae
-
diff --git a/code/src/system-state/Makefile.subdir b/code/src/system-state/Makefile.subdir
index 7ce8e6a..e89ac77 100644
--- a/code/src/system-state/Makefile.subdir
+++ b/code/src/system-state/Makefile.subdir
@@ -1,4 +1,4 @@
-src_libtriton_a_SOURCES += \
+src_libtriton_la_SOURCES += \
src/system-state/system-state.hae \
src/system-state/system-state.ae \
src/system-state/system-state-engine.ae \
diff --git a/code/src/zeroconf/Makefile.subdir b/code/src/zeroconf/Makefile.subdir
index af8cc18..4afaf17 100644
--- a/code/src/zeroconf/Makefile.subdir
+++ b/code/src/zeroconf/Makefile.subdir
@@ -1,4 +1,4 @@
-src_libtriton_a_SOURCES += \
+src_libtriton_la_SOURCES += \
src/zeroconf/zeroconf.c \
src/zeroconf/zeroconf.h
diff --git a/code/tests/Makefile.subdir b/code/tests/Makefile.subdir
index 570a3f9..183aedb 100644
--- a/code/tests/Makefile.subdir
+++ b/code/tests/Makefile.subdir
@@ -13,7 +13,8 @@ check_PROGRAMS += \
tests/placement/test-placement \
tests/system-state/test-system-state \
tests/asg/test-asg-simple \
- tests/asg/test-asg-multi-init
+ tests/asg/test-asg-multi-init \
+ tests/asg/test-asg-cond
#TODO: REPLACEME
#tests/transactional-osd/tosd1
@@ -40,6 +41,7 @@ TESTS += \
tests/common/test-debug.sh \
tests/system-state/test-system-state \
tests/asg/test-asg-simple.sh \
+ tests/asg/test-asg-cond.sh \
tests/asg/test-asg-multi-init.sh
#TODO: REPLACEME
@@ -58,6 +60,7 @@ AE_SRC += tests/placement/test-placement.ae \
tests_common_test_triton_ret_t_SOURCES = tests/common/test-triton-ret-t.c
tests_common_test_debug_SOURCES = tests/common/test-debug.c
tests_asg_test_asg_simple_SOURCES = tests/asg/test-asg-simple.c
+tests_asg_test_asg_cond_SOURCES = tests/asg/test-asg-cond.c
tests_asg_test_asg_multi_init_SOURCES = tests/asg/test-asg-multi-init.c
#tests_transactional_osd_bdb_snapshot_write_SOURCES = tests/transactional-osd/bdb-snapshot-write.c
diff --git a/code/tests/asg/test-asg-cond.c b/code/tests/asg/test-asg-cond.c
new file mode 100644
index 0000000..cd04b07
--- /dev/null
+++ b/code/tests/asg/test-asg-cond.c
@@ -0,0 +1,270 @@
+#include <stdio.h>
+#include <errno.h>
+#include <assert.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include "include/asg.h"
+
+// expects at least a non-empty string fmt
+#define ERR(...) \
+ do { \
+ fprintf(stderr, "Error: %s:%d: ", __FILE__, __LINE__); \
+ fprintf(stderr, __VA_ARGS__); \
+ return -1; \
+ } while (0)
+
+int main(int argc, char **argv)
+{
+ int ret;
+ asg_instance_t ait;
+ asg_update_id_t out_ver;
+ asg_container_id_t cid;
+ asg_object_id_t oid;
+ asg_fork_id_t fid;
+ asg_record_id_t rid;
+ asg_size_t out_size;
+ int fill;
+ asg_record_info_t rinfo;
+
+ if(argc != 2)
+ {
+ fprintf(stderr, "Usage: test-asg-simple <server address>\n");
+ fprintf(stderr, " example: ./test-asg-simple tcp://localhost:3344\n");
+ return(-1);
+ }
+
+ oid = 666;
+
+ cid = 1;
+ fid = 1;
+ rid = 1;
+
+ ret = asg_initialize(&ait, argv[1]);
+ if(ret != ASG_SUCCESS)
+ ERR("asg_initialize(..., \"%s\")\n", argv[1]);
+
+ out_ver = 1111;
+ out_size = 1111;
+
+ /* shorthand */
+#define LOC \
+ ait, ASG_LOCATION_AUTO, cid, oid, fid, rid
+
+ fill = 5;
+ /* write data (effectively a create) */
+ ret = asg_write(
+ LOC,
+ 1, /* rec count */
+ sizeof(fill), /* rec len */
+ ASG_COND_ALL, /* flags */
+ 1, /* update id */
+ &out_ver, /* assigned version */
+ &fill, /* data */
+ &out_size); /* resulting size */
+ if(ret != ASG_SUCCESS)
+ ERR("asg_write() (return %d)\n", ret);
+ else if (out_size != sizeof(fill))
+ ERR("asg_write() (short write)\n");
+ /* the update ID should be exactly what we gave it */
+ else if (out_ver != 1)
+ ERR("gave ver 1 to asg_write, got %lu\n", out_ver);
+
+ out_ver = 1111;
+ out_size = 1111;
+ /* overwrite with a version ID = last - should fail */
+ ret = asg_write(
+ LOC,
+ 1,
+ sizeof(fill),
+ ASG_COND_ALL,
+ 1,
+ &out_ver,
+ &fill,
+ &out_size);
+ if (ret != ASG_ERR_UPDATE_ID)
+ ERR("asg_write(): expected update id error, got %d\n", ret);
+
+ fill = 255;
+ memset(&rinfo, 0xff, sizeof(rinfo));
+ /* read with a version ID - should fail (ver is >=) */
+ ret = asg_read_sequence(
+ LOC,
+ 1, /* rec count */
+ sizeof(fill), /* expected record length */
+ ASG_COND_ALL, /* flags */
+ 1, /* update id */
+ &fill,
+ &rinfo);
+ if(ret != ASG_ERR_UPDATE_ID)
+ ERR("asg_read_sequence(): expected update id error, got %d\n", ret);
+ /* succeed (ver is >) */
+ ret = asg_read_sequence(
+ LOC,
+ 1, /* rec count */
+ sizeof(fill), /* expected record length */
+ ASG_COND_ALL, /* flags */
+ 2, /* update id */
+ &fill,
+ &rinfo);
+ if(ret != ASG_SUCCESS)
+ ERR("asg_read_sequence() (return %d)\n", ret);
+ else if (rinfo.record_id != 1 ||
+ rinfo.seq_len != 1 || rinfo.record_len != sizeof(fill))
+ ERR("asg_read_sequence() (unexpected record info)\n");
+ else if (rinfo.record_update_id != 1)
+ ERR("expected ver 1 from asg_read_sequence, got %lu\n",
+ rinfo.record_update_id);
+ else if (fill != 5)
+ ERR("expected data \"5\" from asg_read_sequence, got %d\n",
+ (int)fill);
+
+ fill = 255;
+ memset(&rinfo, 0xff, sizeof(rinfo));
+ /* read with a version ID - should fail (ver is >=) */
+ ret = asg_read_one(
+ LOC,
+ ASG_COND_ALL,
+ 1,
+ &fill,
+ sizeof(fill),
+ &rinfo);
+ if (ret != ASG_ERR_UPDATE_ID)
+ ERR("asg_read_one(): expected update id error, got %d\n", ret);
+ /* should succeed (ver is >) */
+ ret = asg_read_one(
+ LOC,
+ ASG_COND_ALL,
+ 2,
+ &fill,
+ sizeof(fill),
+ &rinfo);
+ if(ret != ASG_SUCCESS)
+ ERR("asg_read_one() (return %d)\n", ret);
+ else if (rinfo.record_id != 1 ||
+ rinfo.seq_len != 1 || rinfo.record_len != sizeof(fill))
+ ERR("asg_read_one() (unexpected record info)\n");
+ else if (rinfo.record_update_id != 1)
+ ERR("expected ver 1 from asg_read_one, got %lu\n",
+ rinfo.record_update_id);
+ else if (fill != 5)
+ ERR("expected data \"5\" from asg_read_one, got %d\n",
+ (int)fill);
+
+ fill = 6;
+ out_size = 1111;
+ out_ver = 1111;
+ /* now try to increment */
+ ret = asg_write(
+ LOC,
+ 1,
+ sizeof(fill),
+ ASG_COND_ALL,
+ 2,
+ &out_ver,
+ &fill,
+ &out_size);
+ if(ret != ASG_SUCCESS)
+ ERR("asg_write() (return %d)\n", ret);
+ else if (out_size != sizeof(fill))
+ ERR("asg_write() (short write)\n");
+ /* the update ID should be exactly what we gave it */
+ else if (out_ver != 2)
+ ERR("gave ver 2 to asg_write, got %lu\n", out_ver);
+
+ out_ver = 1111; out_size = 1111;
+ /* overwrite with a version ID <= last - should fail */
+ ret = asg_write(
+ LOC,
+ 1,
+ sizeof(fill),
+ ASG_COND_ALL,
+ 2,
+ &out_ver,
+ &fill,
+ &out_size);
+ if (ret != ASG_ERR_UPDATE_ID)
+ ERR("asg_write(): expected update id error, got %d\n", ret);
+
+ fill = 255;
+ memset(&rinfo, 0xff, sizeof(rinfo));
+ /* read with a version ID - should fail (ver is >=) */
+ ret = asg_read_sequence(
+ LOC,
+ 1, /* rec count */
+ 1, /* expected record length */
+ ASG_COND_ALL, /* flags */
+ 2, /* update id */
+ &fill,
+ &rinfo);
+ if(ret != ASG_ERR_UPDATE_ID)
+ ERR("asg_read_sequence(): expected update id error, got %d\n", ret);
+ /* succeed (ver is >) */
+ ret = asg_read_sequence(
+ LOC,
+ 1, /* rec count */
+ sizeof(fill), /* expected record length */
+ ASG_COND_ALL, /* flags */
+ 3, /* update id */
+ &fill,
+ &rinfo);
+ if(ret != ASG_SUCCESS)
+ ERR("asg_read_sequence() (return %d)\n", ret);
+ else if (rinfo.record_id != 1 ||
+ rinfo.seq_len != 1 || rinfo.record_len != sizeof(fill))
+ ERR("asg_read_one() (unexpected record info)\n");
+ else if (rinfo.record_update_id != 2)
+ ERR("expected ver 2 from asg_read_sequence, got %lu\n",
+ rinfo.record_update_id);
+ else if (fill != 6)
+ ERR("expected data \"6\" from asg_read_sequence, got %d\n",
+ (int)fill);
+
+ fill = 255;
+ memset(&rinfo, 0xff, sizeof(rinfo));
+ /* read with a version ID - should fail (ver is >=) */
+ ret = asg_read_one(
+ LOC,
+ ASG_COND_ALL,
+ 2,
+ &fill,
+ 1,
+ &rinfo);
+ if (ret != ASG_ERR_UPDATE_ID)
+ ERR("asg_read_one(): expected update id error, got %d\n", ret);
+ /* should succeed (ver is >) */
+ ret = asg_read_one(
+ LOC,
+ ASG_COND_ALL,
+ 3,
+ &fill,
+ sizeof(fill),
+ &rinfo);
+ if(ret != ASG_SUCCESS)
+ ERR("asg_read_one() (return %d)\n", ret);
+ else if (rinfo.record_id != 1 ||
+ rinfo.seq_len != 1 || rinfo.record_len != sizeof(fill))
+ ERR("asg_read_one() (unexpected record info)\n");
+ else if (rinfo.record_update_id != 2)
+ ERR("expected ver 1 from asg_read_one, got %lu\n",
+ rinfo.record_update_id);
+ else if (fill != 6)
+ ERR("expected data \"6\" from asg_read_one, got %d\n",
+ (int)fill);
+
+ ret = asg_finalize(ait);
+ if(ret != ASG_SUCCESS)
+ ERR("asg_finalize() (return %d)\n", ret);
+
+ return(0);
+}
+
+/*
+ * Local variables:
+ * c-indent-level: 4
+ * c-basic-offset: 4
+ * End:
+ *
+ * vim: ft=c ts=8 sts=4 sw=4 expandtab
+ */
diff --git a/code/tests/asg/test-asg-simple.sh b/code/tests/asg/test-asg-cond.sh
similarity index 91%
copy from code/tests/asg/test-asg-simple.sh
copy to code/tests/asg/test-asg-cond.sh
index 18af42f..57cb9b8 100755
--- a/code/tests/asg/test-asg-simple.sh
+++ b/code/tests/asg/test-asg-cond.sh
@@ -11,7 +11,7 @@ test_start_servers 1 5 60 1
# actual test case
#####################
-run_to 60 tests/asg/test-asg-simple $svr1 555
+run_to 60 tests/asg/test-asg-cond $svr1
if [ $? -ne 0 ]; then
run_to 60 src/admin-tools/triton-shutdown-all-servers $svr1 &> /dev/null
wait
diff --git a/code/tests/asg/test-asg-simple.c b/code/tests/asg/test-asg-simple.c
index 4001e81..56ab632 100644
--- a/code/tests/asg/test-asg-simple.c
+++ b/code/tests/asg/test-asg-simple.c
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
rid, /* start rec */
buffer_sz, /* rec count */
1, /* rec len */
- ASG_AUTO_UPDATE_ID, /* flags */
+ ASG_COND_NONE, /* flags */
0, /* update id */
&out_ver, /* assigned version */
buffer, /* data */
hooks/post-receive
--
1
0
branch, shared-lib, updated. 5efedd840fc08bd6af03ac070e83f0e1170b7d69
by noreply@mcs.anl.gov 04 Mar '15
by noreply@mcs.anl.gov 04 Mar '15
04 Mar '15
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 "".
The branch, shared-lib has been updated
via 5efedd840fc08bd6af03ac070e83f0e1170b7d69 (commit)
from df1cc8d73f9e4446004ffb25b8debfb115dafb87 (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 5efedd840fc08bd6af03ac070e83f0e1170b7d69
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Wed Mar 4 10:43:48 2015 -0600
using built-in java array support a try
it's not the best - java arrays get copied into C on input and back from C on
output, even if it's a write. Inefficient, but the alternatives so far aren't
too great.
-----------------------------------------------------------------------
Summary of changes:
code/bindings/asg.i | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
Diff of changes:
diff --git a/code/bindings/asg.i b/code/bindings/asg.i
index a605ec3..c29898b 100644
--- a/code/bindings/asg.i
+++ b/code/bindings/asg.i
@@ -1,6 +1,7 @@
%module asg
%import "cpointer.i"
%import "carrays.i"
+%import "java/arrays_java.i"
/* fix up default 32 bit C long-> java int mapping (assuming we're using a
* 64-bit jvm) */
@@ -44,10 +45,18 @@ void freearrb(JNIEnv *env, jbyteArray arr, jlong map) {
}
%}
+JAVA_ARRAYS_DECL(signed char, jbyte, Byte, Schar)
+JAVA_ARRAYS_IMPL(signed char, jbyte, Byte, Schar)
+JAVA_ARRAYS_TYPEMAPS(signed char, byte, jbyte, Schar, "[B")
+/*JAVA_ARRAYS_DECL(signed char, jbyte, Byte, Byte)*/
+/*JAVA_ARRAYS_IMPL(signed char, jbyte, Byte, Byte)*/
+/*JAVA_ARRAYS_TYPEMAPS(signed char, byte, jbyte, Byte, "[B")*/
+
/* asg only uses void*'s as arrays of bytes, so we can represent them
* directly */
-%typemap(jstype) void * "byte[]"
-%typemap(javain,pre=" long tmp$javainput = arr2voidb($javainput);",post=" freearrb($javainput, tmp$javainput);") void * "tmp$javainput"
+%apply signed char[] { void * }
+/*%typemap(jstype) void * "byte[]"*/
+/*%typemap(javain,pre=" long tmp$javainput = arr2voidb($javainput);",post=" freearrb($javainput, tmp$javainput);") const void * "tmp$javainput"*/
%inline %{
/* allow create/destroy/get of asg instances (but not modification) */
hooks/post-receive
--
1
0
branch, shared-lib, updated. df1cc8d73f9e4446004ffb25b8debfb115dafb87
by noreply@mcs.anl.gov 04 Mar '15
by noreply@mcs.anl.gov 04 Mar '15
04 Mar '15
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 "".
The branch, shared-lib has been updated
via df1cc8d73f9e4446004ffb25b8debfb115dafb87 (commit)
via 2c09c00fc8daa7e78d0f601dfe7d7e8809adb89f (commit)
via 03b9c0f3895c25b8157bb5ef467d25b48be89c4b (commit)
from 40fd462d6268eb9e645ec61b051bec81f19d5c05 (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 df1cc8d73f9e4446004ffb25b8debfb115dafb87
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Wed Mar 4 09:01:23 2015 -0600
tweaks to conditional test
commit 2c09c00fc8daa7e78d0f601dfe7d7e8809adb89f
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Thu Feb 26 13:26:43 2015 -0600
initial re-support for conditionals
without txn cache, limited in what it can do (auto_update_id will hard-error),
but at least seems to work for cond-all
concurrent updates still need to be checked
commit 03b9c0f3895c25b8157bb5ef467d25b48be89c4b
Author: John Jenkins <jenkins(a)mcs.anl.gov>
Date: Thu Feb 26 09:22:01 2015 -0600
invalid argument return code
-----------------------------------------------------------------------
Summary of changes:
code/include/asg.h | 1 +
code/src/asg/asg-internal.ae | 78 ++++++++++++-----
code/src/replicated-osd/rosd-internal.hae | 4 +
code/src/replicated-osd/rosd-read.ae | 63 ++++++++++++--
code/src/replicated-osd/rosd-write.ae | 87 +++++++++++++++----
code/src/replicated-osd/rosd.ae | 18 ++++
code/src/replicated-osd/rosd.hae | 21 +++++-
code/tests/asg/test-asg-cond.c | 134 +++++++++++++++++------------
code/tests/asg/test-asg-simple.c | 2 +-
9 files changed, 299 insertions(+), 109 deletions(-)
Diff of changes:
diff --git a/code/include/asg.h b/code/include/asg.h
index f73f303..59fdc94 100644
--- a/code/include/asg.h
+++ b/code/include/asg.h
@@ -166,6 +166,7 @@ typedef enum
ASG_ERR_NOENT = 3, /**< entity does not exist */
ASG_ERR_BUFFER_SMALL = 4, /**< buffer too small to hold data */
ASG_ERR_RECORDLEN_INVAL = 5, /**< invalid record length */
+ ASG_ERR_INVAL = 6, /**< invalid arguments */
ASG_ERR_OTHER = 54321 /**< all other failure modes */
} asg_ret_t;
diff --git a/code/src/asg/asg-internal.ae b/code/src/asg/asg-internal.ae
index c11cbdf..415cddf 100644
--- a/code/src/asg/asg-internal.ae
+++ b/code/src/asg/asg-internal.ae
@@ -34,6 +34,21 @@ void asg_callback (void *user_ptr, int ret)
return;
}
+static uint32_t convert_flags_to_rosd(asg_flags_t flags) {
+ switch (flags) {
+ case ASG_COND_NONE: /* ASG_COND_UNCONDITIONAL currently the same */
+ return ROSD_COND_UNCONDITIONAL;
+ case ASG_COND_UNTIL: /* currently unsupported */
+ return -1;
+ case ASG_COND_ALL:
+ return ROSD_COND_ALL;
+ case ASG_AUTO_UPDATE_ID: /* currently unsupported */
+ return -1;
+ default: /* unknown flags */
+ return -1;
+ }
+}
+
/**
* should initialize all the server name and their address
* first step, use options as the server address we want to connect
@@ -112,21 +127,12 @@ __blocking int asg_i_write (
asg_size_t * transferred)
{
triton_ret_t tret;
+ int aret;
+
+ uint32_t rosd_flags;
const char * replication_factor_env;
uint32_t replication_factor;
- //build oid and get server info from it;
-
- /**
- * last two args are: uint64_t txn_number, uint32_t flags;
- * remote_triton_rpc_rosd_write does not provide the ability to check
- * whether current condition satisfy the 'version_condition', we need to
- * implement it before calling write function.
-
- printf("oid is %s\n", triton_uint128_to_string(oid));
- printf("fork_id: %ld\n", (uint64_t)fork_id);
- printf("data: %s, has %d lengh with new version: %ld with flag:%d\n", data, recordlen, (uint64_t)new_version, flags);
- */
/* hack: use environment variable to control the replication factor */
replication_factor = 0;
@@ -138,21 +144,31 @@ __blocking int asg_i_write (
}
}
- tret = remote_triton_rpc_rosd_write(container, object, fork,
- start_record, recordcount, recordlen, data, flags, version_condition,
- new_version, replication_factor);
+ rosd_flags = convert_flags_to_rosd(flags);
+ if (rosd_flags == -1) {
+ return ASG_ERR_INVAL;
+ }
- if (triton_is_error(tret))
+ tret = remote_triton_rpc_rosd_write(container, object, fork,
+ start_record, recordcount, recordlen, data,
+ rosd_flags, version_condition, new_version,
+ replication_factor);
+
+ if (triton_error_equal(tret, TRITON_ERR_CONDITIONAL))
+ aret = ASG_ERR_UPDATE_ID;
+ else if (triton_is_error(tret))
{
triton_error_print(tret, "remote_triton_rpc_rosd_write ");
triton_error_destroy(tret);
- return(ASG_ERR_OTHER);
+ aret = ASG_ERR_OTHER;
+ }
+ else {
+ *transferred = recordcount * recordlen;
+ aret = ASG_SUCCESS;
}
- triton_error_destroy(tret);
-
- *transferred = recordcount * recordlen;
- return(ASG_SUCCESS);
+ triton_error_destroy(tret);
+ return aret;
}
__blocking int asg_i_read_sequence (
@@ -172,9 +188,15 @@ __blocking int asg_i_read_sequence (
triton_ret_t tret;
int ret = ASG_SUCCESS;
struct rosd_record_info rinfo;
+ uint32_t rosd_flags;
if (instance!=1) return ASG_ERR_OTHER;
+ rosd_flags = convert_flags_to_rosd(flags);
+ if (rosd_flags == -1 || rosd_flags == ROSD_COND_AUTO) {
+ return ASG_ERR_INVAL;
+ }
+
tret = remote_triton_rpc_rosd_read_sequence(
(uint64_t)container,
(uint64_t)object,
@@ -182,12 +204,14 @@ __blocking int asg_i_read_sequence (
(uint64_t)record_start,
(uint64_t)record_count,
(uint64_t)record_expected_len,
- (uint32_t)flags,
+ rosd_flags,
(uint64_t)update_id_condition,
buf,
&rinfo);
- if (triton_is_error(tret)) {
+ if (triton_error_equal(tret, TRITON_ERR_CONDITIONAL))
+ ret = ASG_ERR_UPDATE_ID;
+ else if (triton_is_error(tret)) {
/* TODO: do we really want _print fns in the library? */
triton_error_print(tret, "remote_triton_rpc_rosd_read_sequence");
ret = ASG_ERR_OTHER;
@@ -222,13 +246,19 @@ __blocking int asg_i_read_one (
uint64_t record_len;
uint64_t record_update_id;
int ret;
+ uint32_t rosd_flags;
+
+ rosd_flags = convert_flags_to_rosd(flags);
+ if (rosd_flags == -1 || rosd_flags == ROSD_COND_AUTO) {
+ return ASG_ERR_INVAL;
+ }
tret = remote_triton_rpc_rosd_read_one(
container,
object,
fork,
record,
- flags,
+ rosd_flags,
update_id_condition,
buf,
buf_size,
diff --git a/code/src/replicated-osd/rosd-internal.hae b/code/src/replicated-osd/rosd-internal.hae
index 76ebdd3..0302e78 100644
--- a/code/src/replicated-osd/rosd-internal.hae
+++ b/code/src/replicated-osd/rosd-internal.hae
@@ -7,6 +7,7 @@
*/
#include "src/replicated-osd/rosd.hae"
+#include "hoss.hae"
/* default replication level for objects (set via zeroconf) */
extern uint32_t rosd_default_replication_factor;
@@ -14,6 +15,9 @@ extern uint32_t rosd_default_replication_factor;
/* default fork used to store replication factor in object */
#define REP_FACTOR_FORK UINT64_MAX
+/* helper function to convert rosd conditionals into hoss conditionals */
+hoss_flags_t rosd_convert_flags_to_hoss(uint32_t flags);
+
triton_ret_t triton_oid_to_addrs(
uint64_t oid,
uint32_t replication_factor,
diff --git a/code/src/replicated-osd/rosd-read.ae b/code/src/replicated-osd/rosd-read.ae
index e174d3c..de5e2f0 100644
--- a/code/src/replicated-osd/rosd-read.ae
+++ b/code/src/replicated-osd/rosd-read.ae
@@ -180,7 +180,7 @@ __blocking triton_ret_t remote_triton_rpc_rosd_read_one(
uint64_t update_id_condition,
void * buf,
size_t buf_size,
- uint64_t record_len,
+ uint64_t * record_len,
uint64_t * record_update_id) {
triton_rpc_rosd_read_one_in_t in;
@@ -209,6 +209,11 @@ __blocking triton_ret_t remote_triton_rpc_rosd_read_one(
tret = triton_error_dup(out.tret);
+ if (!triton_is_error(tret)) {
+ *record_len = out.record_len;
+ *record_update_id = out.record_update_id;
+ }
+
triton_mercury_addr_free(addr);
HG_Free_output(handle, &out);
HG_Destroy(handle);
@@ -240,6 +245,8 @@ static __blocking triton_ret_t rosd_read_one_local_storage(
hoss_size_t nrecs;
hoss_update_t update_info;
struct hoss_record_info rec_info;
+ hoss_flags_t hoss_flags;
+ int do_commit;
soid.nids = 3;
soid.ids = soid_eids;
@@ -247,6 +254,13 @@ static __blocking triton_ret_t rosd_read_one_local_storage(
soid_eids[1] = object;
soid_eids[2] = fork;
+ hoss_flags = rosd_convert_flags_to_hoss(flags);
+ if (hoss_flags == -1) {
+ triton_error_msg(
+ "invalid ROSD flags passed in (should be caught earlier)\n");
+ return TRITON_ERR_INVAL;
+ }
+
/* TODO: handle canceled error code (or whatever hoss will report to
* indicate that a txn failed and should be retried)
*/
@@ -254,26 +268,42 @@ static __blocking triton_ret_t rosd_read_one_local_storage(
if(ret != 0)
return(TRITON_ERR_IO);
- ret = hoss_read(&soid, record, 1, HOSS_NONE, update_id_condition, buf,
- buf_sz, &rec_info, 1, grp, &nbytes, &nrecs, &update_info,
+ ret = hoss_read(&soid, record, 1, hoss_flags, update_id_condition, buf,
+ buf_sz, &rec_info, 1, grp, record_len, &nrecs, &update_info,
&hoss_rc);
+ do_commit = 0;
if (ret != 0)
tret = TRITON_ERR_IO;
/* check for short buffer */
+ else if (hoss_rc == HOSS_ECONDFAIL) {
+ /* TODO: have to "commit" here, else hoss/idb segfaults */
+ tret = TRITON_ERR_CONDITIONAL;
+ do_commit = 1;
+ }
else if (hoss_rc == ENOSPC) {
+ /* TODO: this also requires a "commit"? */
tret = TRITON_ERR_RECV_TOO_SMALL;
+ do_commit = 1;
}
/* check for other io errors */
else if (hoss_rc != 0)
tret = TRITON_ERR_IO;
/* check for nonexistent record */
- else if (nrecs == 0)
+ else if (nrecs == 0) {
+ /* TODO: this also requires a "commit"? */
+ do_commit = 1;
tret = TRITON_ERR_NOENT;
- else
+ }
+ else {
tret = TRITON_SUCCESS;
+ *new_update_id = rec_info.update_id;
+ do_commit = 1;
+ }
- hoss_end(grp, 1);
+ ret = hoss_end(grp, do_commit);
+ if (ret != 0)
+ return TRITON_ERR_IO;
return tret;
}
@@ -297,6 +327,7 @@ static __blocking triton_ret_t rosd_read_sequence_local_storage(
int ret, hoss_rc;
hoss_size_t n_recs;
hoss_update_t update_info;
+ hoss_flags_t hoss_flags;
/* NOTE: we provide two hoss_record_info structs here. In normal
* operation we only expect 1 of them to be filled in. The second one
@@ -306,6 +337,13 @@ static __blocking triton_ret_t rosd_read_sequence_local_storage(
*/
struct hoss_record_info rec_array[2];
+ hoss_flags = rosd_convert_flags_to_hoss(flags);
+ if (hoss_flags == -1) {
+ triton_error_msg(
+ "invalid ROSD flags passed in (should be caught earlier)\n");
+ return TRITON_ERR_INVAL;
+ }
+
/* TODO: handle canceled error code (or whatever hoss will report to
* indicate that a txn failed and should be retried)
*/
@@ -321,15 +359,21 @@ static __blocking triton_ret_t rosd_read_sequence_local_storage(
soid_eids[1] = object;
soid_eids[2] = fork;
- ret = hoss_read(&soid, record_start, record_count, HOSS_NONE, update_id_condition, buffer, record_count*record_expected_len, rec_array, 2, grp, &nbytes, &n_recs, &update_info, &hoss_rc);
+ ret = hoss_read(&soid, record_start, record_count, hoss_flags, update_id_condition, buffer, record_count*record_expected_len, rec_array, 2, grp, &nbytes, &n_recs, &update_info, &hoss_rc);
/* check for fundamental I/O error */
- if(ret != 0 || hoss_rc != 0)
+ if(ret != 0)
{
- triton_error_msg("hoss_read() failure, return code %d\n", ret);
+ triton_error_msg("hoss_read() failure, return %d, hoss rc %d\n", ret,
+ hoss_rc);
hoss_end(grp, 0);
return(TRITON_ERR_IO);
}
+ else if (hoss_rc == HOSS_ECONDFAIL) {
+ /* TODO: currently have to "commit" - segfaults otherwise */
+ hoss_end(grp, 1);
+ return TRITON_ERR_CONDITIONAL;
+ }
/* check for unexpected record size */
if(n_recs == 2 || (n_recs ==1 && rec_array[0].reclen != record_expected_len))
{
@@ -352,6 +396,7 @@ static __blocking triton_ret_t rosd_read_sequence_local_storage(
{
assert(n_recs == 1);
*records_read = rec_array[0].nrecs;
+ *new_update_id = rec_array[0].update_id;
}
else
{
diff --git a/code/src/replicated-osd/rosd-write.ae b/code/src/replicated-osd/rosd-write.ae
index fb3c0f7..6985897 100644
--- a/code/src/replicated-osd/rosd-write.ae
+++ b/code/src/replicated-osd/rosd-write.ae
@@ -70,7 +70,8 @@ static __blocking triton_ret_t rosd_write_do_work(
int my_position,
uint64_t start_record,
uint64_t recordcount,
- triton_rpc_rosd_write_in_t* in);
+ triton_rpc_rosd_write_in_t* in,
+ uint64_t *new_update_id);
static __blocking triton_ret_t rosd_write_local_storage(
uint64_t container,
@@ -124,7 +125,8 @@ static __blocking triton_ret_t rosd_handle_write_segment(
triton_rpc_rosd_write_in_t* in,
uint64_t start_record,
int64_t remote_offset,
- uint64_t recordcount)
+ uint64_t recordcount,
+ uint64_t *new_update_id)
{
char *buffer;
triton_ret_t tret;
@@ -172,7 +174,8 @@ static __blocking triton_ret_t rosd_handle_write_segment(
my_position,
start_record,
recordcount,
- in);
+ in,
+ new_update_id);
buffer_mgmt_free(token);
@@ -184,7 +187,8 @@ static __blocking triton_ret_t rosd_write_run_pipeline(
na_addr_t src_addr,
na_addr_t next_addr,
int my_position,
- triton_rpc_rosd_write_in_t* in
+ triton_rpc_rosd_write_in_t* in,
+ uint64_t *new_update_id
)
{
int64_t current_remote_offset = 0;
@@ -192,6 +196,9 @@ static __blocking triton_ret_t rosd_write_run_pipeline(
triton_ret_t out_tret = TRITON_SUCCESS;
triton_mutex_t pipeline_mutex;
uint64_t records_per_buffer;
+ int is_update_id_set;
+ *new_update_id = 0;
+ is_update_id_set = 0;
triton_mutex_init(&pipeline_mutex, NULL);
@@ -211,6 +218,7 @@ static __blocking triton_ret_t rosd_write_run_pipeline(
pprivate uint64_t this_start_record;
pprivate int64_t this_remote_offset;
pprivate uint64_t this_recordcount;
+ pprivate uint64_t this_update_id;
/* One pbranch for pipeline depth. Each pbranch can be though of
* like a worker in a thread pool model.
@@ -260,13 +268,23 @@ static __blocking triton_ret_t rosd_write_run_pipeline(
in,
this_start_record,
this_remote_offset,
- this_recordcount);
+ this_recordcount,
+ &this_update_id);
triton_mutex_lock(&pipeline_mutex);
+ /* TODO: revisit update ID checking - everything should
+ * currently work its way to UINT64_MAX if there are any
+ * discrepencies */
if(triton_is_error(b_tret))
{
out_tret = b_tret;
}
+ else if (is_update_id_set &&
+ *new_update_id != this_update_id)
+ *new_update_id = ROSD_UPDATE_ID_MIXED;
+ else if (!is_update_id_set)
+ *new_update_id = this_update_id;
+
triton_mutex_unlock(&pipeline_mutex);
}
}
@@ -515,7 +533,6 @@ static __blocking triton_ret_t triton_rpc_rosd_write(hg_handle_t handle)
}
}
#else
- in.update_id_condition = 0;
#endif
if(my_position < (in.replication_factor-1))
@@ -526,7 +543,7 @@ static __blocking triton_ret_t triton_rpc_rosd_write(hg_handle_t handle)
triton_debug(triton_dbg_rosd, "rosd_write() triggered, running pipeline.\n");
out.tret = rosd_write_run_pipeline(handle, src_addr, next_addr, my_position,
- &in);
+ &in, &out.new_update_id);
#if 0
if(entry_p)
@@ -596,6 +613,7 @@ static __blocking triton_ret_t __remote_triton_rpc_rosd_write(
triton_mercury_run_rpc_with_bulk(addr, rpc_rosd_write_id, handle,
&in, &out, in.bulk_handle, 1, &data, &bulk_size, 0, HG_BULK_READ_ONLY);
+ *new_update_id = out.new_update_id;
tret = triton_error_dup(out.tret);
HG_Free_output(handle, &out);
@@ -610,12 +628,13 @@ static __blocking triton_ret_t rosd_write_do_work(
int my_position,
uint64_t start_record,
uint64_t recordcount,
- triton_rpc_rosd_write_in_t* in)
+ triton_rpc_rosd_write_in_t* in,
+ uint64_t *new_update_id)
{
triton_ret_t local_tret;
triton_ret_t remote_tret = TRITON_SUCCESS;
triton_ret_t tret;
- uint64_t new_update_id;
+ uint64_t new_update_id_local, new_update_id_remote;
/* right now only chained replication is supported */
assert(!(in->flags & ROSD_FLAG_FANOUT));
@@ -633,7 +652,7 @@ static __blocking triton_ret_t rosd_write_do_work(
remote_tret = __remote_triton_rpc_rosd_write(
next_addr, in->container, in->object, in->fork,
start_record, recordcount, in->recordlen, buffer,
- in->flags, in->update_id_condition, &new_update_id,
+ in->flags, in->update_id_condition, &new_update_id_remote,
my_position+1, in->replication_factor);
}
}
@@ -657,13 +676,14 @@ static __blocking triton_ret_t rosd_write_do_work(
recordcount,
in->recordlen,
buffer,
- 0,
+ in->flags,
in->update_id_condition,
- &new_update_id);
+ &new_update_id_local);
}
}
}
+
if(my_position < in->replication_factor-1)
tret = interpret_errors(local_tret, remote_tret, my_position,
is_usage_error_write, !in->expected_position);
@@ -671,6 +691,12 @@ static __blocking triton_ret_t rosd_write_do_work(
tret = interpret_error(local_tret, my_position, is_usage_error_write,
!in->expected_position);
+ /* TODO: proper error checking for this */
+ if (tret == TRITON_SUCCESS && my_position < in->replication_factor-1) {
+ assert(new_update_id_local == new_update_id_remote);
+ }
+ *new_update_id = new_update_id_local;
+
return(tret);
}
@@ -686,7 +712,8 @@ static int is_usage_error_write(triton_ret_t tret)
*/
if(triton_error_equal(tret, TRITON_ERR_NO_SERVERS) ||
triton_error_equal(tret, TRITON_ERR_NOENT) ||
- triton_error_equal(tret, TRITON_ERR_ACCES))
+ triton_error_equal(tret, TRITON_ERR_ACCES) ||
+ triton_error_equal(tret, TRITON_ERR_CONDITIONAL))
{
/* if there aren't enough servers to satisfy the replication
* request, or the object doesn't exist, or if
@@ -714,8 +741,9 @@ static __blocking triton_ret_t rosd_write_local_storage(
struct hoss_oid soid;
hoss_eid_t soid_eids[3];
hoss_size_t nbytes;
- hoss_update_t update_info;
+ hoss_update_t update_check, update_new;
int ret, hoss_rc;
+ hoss_flags_t hoss_flags;
/* TODO: handle canceled error code (or whatever hoss will report to
* indicate that a txn failed and should be retried)
@@ -723,6 +751,7 @@ static __blocking triton_ret_t rosd_write_local_storage(
ret = hoss_begin(&grp, NULL, HOSS_MSYNC|HOSS_ORDERED|HOSS_DEFERRED, g_hoss_ctx);
if(ret != 0)
{
+ triton_error_msg("hoss_begin() failure (write)\n");
return(TRITON_ERR_IO);
}
@@ -732,8 +761,24 @@ static __blocking triton_ret_t rosd_write_local_storage(
soid_eids[1] = object;
soid_eids[2] = fork;
+ /* convert and sanity check the flags */
+ hoss_flags = rosd_convert_flags_to_hoss(flags);
+ if (hoss_flags == -1) {
+ triton_error_msg(
+ "invalid ROSD flags passed in (should be caught earlier)\n");
+ return TRITON_ERR_INVAL;
+ }
+
+ /* TODO: what to do when no update id is given */
+ if (hoss_flags == HOSS_NONE)
+ update_new = 0;
+ else
+ update_new = update_id_condition;
+
/* TODO: the update id arguments probably aren't right here... */
- ret = hoss_write(&soid, start_record, recordcount, recordlen, HOSS_NONE, 0, update_id_condition, buffer, grp, &nbytes, &hoss_rc);
+ ret = hoss_write(&soid, start_record, recordcount, recordlen, hoss_flags,
+ update_new, update_new, buffer, grp, &nbytes,
+ &hoss_rc);
if(ret != 0)
{
triton_error_msg("hoss_write() failure, return code %d\n", ret);
@@ -742,19 +787,25 @@ static __blocking triton_ret_t rosd_write_local_storage(
}
ret = hoss_end(grp, 1);
- if(ret != 0)
+ if (ret == HOSS_ECONDFAIL)
+ return TRITON_ERR_CONDITIONAL;
+ else if(ret != 0)
{
+ triton_error_msg("hoss_end() failure (write), return code %d\n", ret);
return(TRITON_ERR_IO);
}
-
/* NOTE: output arguments to hoss_write (rc and nbytes) are not filled
* in until completion of hoss_end()
*/
- if(hoss_rc != 0 || nbytes != recordcount*recordlen)
+ else if(hoss_rc != 0 || nbytes != recordcount*recordlen)
{
triton_error_msg("hoss_write() failure or short write.\n");
return(TRITON_ERR_IO);
}
+
+ /* success - set update condition */
+ *new_update_id = update_new;
+
return(TRITON_SUCCESS);
}
diff --git a/code/src/replicated-osd/rosd.ae b/code/src/replicated-osd/rosd.ae
index d430b52..e2e6851 100644
--- a/code/src/replicated-osd/rosd.ae
+++ b/code/src/replicated-osd/rosd.ae
@@ -177,6 +177,24 @@ void triton_rpc_rosd_register(void)
return;
}
+/* TODO: don't have a hoss-equivalent for UNTIL or AUTO yet, AFAIK */
+/* TODO: not sure if HOSS_NONE usage is correct */
+hoss_flags_t rosd_convert_flags_to_hoss(uint32_t flags) {
+ switch (ROSD_COND_MASK(flags)) {
+ case ROSD_COND_UNCONDITIONAL:
+ return HOSS_NONE;
+ case ROSD_COND_UNTIL:
+ return -1;
+ case ROSD_COND_ALL:
+ return HOSS_COND_ALL;
+ case ROSD_COND_AUTO:
+ return -1;
+ default:
+ /* unknown flags */
+ return -1;
+ }
+}
+
triton_ret_t triton_oid_to_addrs(
uint64_t oid,
uint32_t replication_factor,
diff --git a/code/src/replicated-osd/rosd.hae b/code/src/replicated-osd/rosd.hae
index 58f2290..6d47f12 100644
--- a/code/src/replicated-osd/rosd.hae
+++ b/code/src/replicated-osd/rosd.hae
@@ -18,6 +18,7 @@
#define ROSD_FLAG_TRUNC_WRITE 4
/* to make writes conditional (provided version number must be strictly
* greater than current version number for the region in the object)
+ * NOTE: deprecated (currently unused in non-ancient revisions of triton
*/
#define ROSD_FLAG_COND_WRITE 8
/* set by master to tell replicas that this is expected to be the first
@@ -26,6 +27,24 @@
*/
#define ROSD_FLAG_FIRST_WRITE 16
+#define ROSD_FLAG_MAX 32
+
+#define ROSD_FLAG_MASK(x) (x & (ROSD_FLAG_MAX-1))
+#define ROSD_COND_MASK(x) (x & (~(ROSD_FLAG_MAX-1)))
+
+/* ROSD conditional operation flags (basically mirrors the ASG equivalents) */
+typedef enum {
+ /* no condition - version numbers unchanged (but still returned) */
+ ROSD_COND_UNCONDITIONAL = ROSD_FLAG_MAX,
+ /* read: read in order until finding a record with >= version number
+ * write/punch: update in order until finding a record with >= version
+ * number */
+ ROSD_COND_UNTIL = (ROSD_FLAG_MAX << 1),
+ /* read/write: commit if *all* records in range have version #s strictly
+ * smaller than the provided */
+ ROSD_COND_ALL = (ROSD_FLAG_MAX << 2),
+ ROSD_COND_AUTO = (ROSD_FLAG_MAX << 3)
+} rosd_cond_flags_t;
/* special values */
/* TODO: how to sync these with ASG equivalents cleanly? */
@@ -104,7 +123,7 @@ __blocking triton_ret_t remote_triton_rpc_rosd_read_one(
uint64_t update_id_condition,
void * buf,
size_t buf_size,
- uint64_t record_len,
+ uint64_t * record_len,
uint64_t * record_update_id);
__blocking triton_ret_t rosd_pipeline_setup_one_buffer(
diff --git a/code/tests/asg/test-asg-cond.c b/code/tests/asg/test-asg-cond.c
index 0e4c3a9..cd04b07 100644
--- a/code/tests/asg/test-asg-cond.c
+++ b/code/tests/asg/test-asg-cond.c
@@ -10,7 +10,7 @@
// expects at least a non-empty string fmt
#define ERR(...) \
do { \
- fprintf(stderr, "%s:%d:", __FILE__, __LINE__); \
+ fprintf(stderr, "Error: %s:%d: ", __FILE__, __LINE__); \
fprintf(stderr, __VA_ARGS__); \
return -1; \
} while (0)
@@ -25,7 +25,7 @@ int main(int argc, char **argv)
asg_fork_id_t fid;
asg_record_id_t rid;
asg_size_t out_size;
- char fill = 'c';
+ int fill;
asg_record_info_t rinfo;
if(argc != 2)
@@ -43,77 +43,84 @@ int main(int argc, char **argv)
ret = asg_initialize(&ait, argv[1]);
if(ret != ASG_SUCCESS)
- ERR("Error: asg_initialize(..., \"%s\")\n", argv[1]);
+ ERR("asg_initialize(..., \"%s\")\n", argv[1]);
- out_ver = -1;
- out_size = -1;
+ out_ver = 1111;
+ out_size = 1111;
/* shorthand */
#define LOC \
ait, ASG_LOCATION_AUTO, cid, oid, fid, rid
+ fill = 5;
/* write data (effectively a create) */
ret = asg_write(
LOC,
1, /* rec count */
- 1, /* rec len */
+ sizeof(fill), /* rec len */
ASG_COND_ALL, /* flags */
1, /* update id */
&out_ver, /* assigned version */
&fill, /* data */
&out_size); /* resulting size */
if(ret != ASG_SUCCESS)
- ERR("Error: asg_write()\n");
- else if (out_size != 1)
- ERR("Error: asg_write() (short write)\n");
+ ERR("asg_write() (return %d)\n", ret);
+ else if (out_size != sizeof(fill))
+ ERR("asg_write() (short write)\n");
/* the update ID should be exactly what we gave it */
else if (out_ver != 1)
- ERR("Error: gave ver 1 to asg_write, got %lu\n", out_ver);
+ ERR("gave ver 1 to asg_write, got %lu\n", out_ver);
- out_ver = -1;
- out_size = -1;
+ out_ver = 1111;
+ out_size = 1111;
/* overwrite with a version ID = last - should fail */
ret = asg_write(
LOC,
1,
- 1,
+ sizeof(fill),
ASG_COND_ALL,
1,
&out_ver,
&fill,
&out_size);
if (ret != ASG_ERR_UPDATE_ID)
- ERR("asg_write(): expected update id error\n");
+ ERR("asg_write(): expected update id error, got %d\n", ret);
+ fill = 255;
memset(&rinfo, 0xff, sizeof(rinfo));
/* read with a version ID - should fail (ver is >=) */
ret = asg_read_sequence(
LOC,
1, /* rec count */
- 1, /* expected record length */
+ sizeof(fill), /* expected record length */
ASG_COND_ALL, /* flags */
1, /* update id */
&fill,
&rinfo);
if(ret != ASG_ERR_UPDATE_ID)
- ERR("asg_read_sequence(): expected update id error\n");
+ ERR("asg_read_sequence(): expected update id error, got %d\n", ret);
/* succeed (ver is >) */
ret = asg_read_sequence(
LOC,
1, /* rec count */
- 1, /* expected record length */
+ sizeof(fill), /* expected record length */
ASG_COND_ALL, /* flags */
2, /* update id */
&fill,
&rinfo);
if(ret != ASG_SUCCESS)
- ERR("Error: asg_read_sequence()\n");
+ ERR("asg_read_sequence() (return %d)\n", ret);
else if (rinfo.record_id != 1 ||
- rinfo.seq_len != 1 || rinfo.record_len != 1)
- ERR("Error: asg_read_sequence()\n");
+ rinfo.seq_len != 1 || rinfo.record_len != sizeof(fill))
+ ERR("asg_read_sequence() (unexpected record info)\n");
else if (rinfo.record_update_id != 1)
- ERR("Error: expected ver 1 from asg_read_sequence\n");
+ ERR("expected ver 1 from asg_read_sequence, got %lu\n",
+ rinfo.record_update_id);
+ else if (fill != 5)
+ ERR("expected data \"5\" from asg_read_sequence, got %d\n",
+ (int)fill);
+ fill = 255;
memset(&rinfo, 0xff, sizeof(rinfo));
/* read with a version ID - should fail (ver is >=) */
ret = asg_read_one(
@@ -121,60 +128,66 @@ int main(int argc, char **argv)
ASG_COND_ALL,
1,
&fill,
- 1,
+ sizeof(fill),
&rinfo);
if (ret != ASG_ERR_UPDATE_ID)
- ERR("asg_read_one(): expected update id error\n");
+ ERR("asg_read_one(): expected update id error, got %d\n", ret);
/* should succeed (ver is >) */
ret = asg_read_one(
LOC,
ASG_COND_ALL,
- 1,
- &fill,
2,
+ &fill,
+ sizeof(fill),
&rinfo);
if(ret != ASG_SUCCESS)
- ERR("Error: asg_read_one()\n");
+ ERR("asg_read_one() (return %d)\n", ret);
else if (rinfo.record_id != 1 ||
- rinfo.seq_len != 1 || rinfo.record_len != 1)
- ERR("Error: asg_read_one()\n");
+ rinfo.seq_len != 1 || rinfo.record_len != sizeof(fill))
+ ERR("asg_read_one() (unexpected record info)\n");
else if (rinfo.record_update_id != 1)
- ERR("Error: expected ver 1 from asg_read_one\n");
+ ERR("expected ver 1 from asg_read_one, got %lu\n",
+ rinfo.record_update_id);
+ else if (fill != 5)
+ ERR("expected data \"5\" from asg_read_one, got %d\n",
+ (int)fill);
- out_size = -1;
- out_ver = -1;
+ fill = 6;
+ out_size = 1111;
+ out_ver = 1111;
/* now try to increment */
ret = asg_write(
LOC,
1,
- 1,
+ sizeof(fill),
ASG_COND_ALL,
2,
&out_ver,
&fill,
&out_size);
if(ret != ASG_SUCCESS)
- ERR("Error: asg_write()\n");
- else if (out_size != 1)
- ERR("Error: asg_write() (short write)\n");
+ ERR("asg_write() (return %d)\n", ret);
+ else if (out_size != sizeof(fill))
+ ERR("asg_write() (short write)\n");
/* the update ID should be exactly what we gave it */
else if (out_ver != 2)
- ERR("Error: gave ver 2 to asg_write, got %lu\n", out_ver);
+ ERR("gave ver 2 to asg_write, got %lu\n", out_ver);
- out_ver = -1; out_size = -1;
+ out_ver = 1111; out_size = 1111;
/* overwrite with a version ID <= last - should fail */
ret = asg_write(
LOC,
1,
- 1,
+ sizeof(fill),
ASG_COND_ALL,
2,
&out_ver,
&fill,
&out_size);
if (ret != ASG_ERR_UPDATE_ID)
- ERR("asg_write(): expected update id error\n");
+ ERR("asg_write(): expected update id error, got %d\n", ret);
+ fill = 255;
memset(&rinfo, 0xff, sizeof(rinfo));
/* read with a version ID - should fail (ver is >=) */
ret = asg_read_sequence(
@@ -186,54 +199,63 @@ int main(int argc, char **argv)
&fill,
&rinfo);
if(ret != ASG_ERR_UPDATE_ID)
- ERR("asg_read_sequence(): expected update id error\n");
+ ERR("asg_read_sequence(): expected update id error, got %d\n", ret);
/* succeed (ver is >) */
ret = asg_read_sequence(
LOC,
1, /* rec count */
- 1, /* expected record length */
+ sizeof(fill), /* expected record length */
ASG_COND_ALL, /* flags */
3, /* update id */
&fill,
&rinfo);
if(ret != ASG_SUCCESS)
- ERR("Error: asg_read_sequence()\n");
+ ERR("asg_read_sequence() (return %d)\n", ret);
else if (rinfo.record_id != 1 ||
- rinfo.seq_len != 1 || rinfo.record_len != 1)
- ERR("Error: asg_read_one()\n");
+ rinfo.seq_len != 1 || rinfo.record_len != sizeof(fill))
+ ERR("asg_read_one() (unexpected record info)\n");
else if (rinfo.record_update_id != 2)
- ERR("Error: expected ver 2 from asg_read_sequence\n");
+ ERR("expected ver 2 from asg_read_sequence, got %lu\n",
+ rinfo.record_update_id);
+ else if (fill != 6)
+ ERR("expected data \"6\" from asg_read_sequence, got %d\n",
+ (int)fill);
+ fill = 255;
memset(&rinfo, 0xff, sizeof(rinfo));
/* read with a version ID - should fail (ver is >=) */
ret = asg_read_one(
LOC,
ASG_COND_ALL,
- 1,
- &fill,
2,
+ &fill,
+ 1,
&rinfo);
if (ret != ASG_ERR_UPDATE_ID)
- ERR("asg_read_one(): expected update id error\n");
+ ERR("asg_read_one(): expected update id error, got %d\n", ret);
/* should succeed (ver is >) */
ret = asg_read_one(
LOC,
ASG_COND_ALL,
- 1,
- &fill,
3,
+ &fill,
+ sizeof(fill),
&rinfo);
if(ret != ASG_SUCCESS)
- ERR("Error: asg_read_one()\n");
+ ERR("asg_read_one() (return %d)\n", ret);
else if (rinfo.record_id != 1 ||
- rinfo.seq_len != 1 || rinfo.record_len != 1)
- ERR("Error: asg_read_one()\n");
- else if (rinfo.record_update_id != 1)
- ERR("Error: expected ver 1 from asg_read_one\n");
+ rinfo.seq_len != 1 || rinfo.record_len != sizeof(fill))
+ ERR("asg_read_one() (unexpected record info)\n");
+ else if (rinfo.record_update_id != 2)
+ ERR("expected ver 1 from asg_read_one, got %lu\n",
+ rinfo.record_update_id);
+ else if (fill != 6)
+ ERR("expected data \"6\" from asg_read_one, got %d\n",
+ (int)fill);
ret = asg_finalize(ait);
if(ret != ASG_SUCCESS)
- ERR("Error: asg_finalize()\n");
+ ERR("asg_finalize() (return %d)\n", ret);
return(0);
}
diff --git a/code/tests/asg/test-asg-simple.c b/code/tests/asg/test-asg-simple.c
index 4001e81..56ab632 100644
--- a/code/tests/asg/test-asg-simple.c
+++ b/code/tests/asg/test-asg-simple.c
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
rid, /* start rec */
buffer_sz, /* rec count */
1, /* rec len */
- ASG_AUTO_UPDATE_ID, /* flags */
+ ASG_COND_NONE, /* flags */
0, /* update id */
&out_ver, /* assigned version */
buffer, /* data */
hooks/post-receive
--
1
0
02 Mar '15
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 "".
The branch, master has been updated
via 3d18796dbf71aa1263d2822cdae898c4907809bf (commit)
from beac38cef731f7875b42ecb63a90150d9bc98a02 (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 3d18796dbf71aa1263d2822cdae898c4907809bf
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 2 10:32:27 2015 -0500
RobR: fix typo, add TODO on measurements
-----------------------------------------------------------------------
Summary of changes:
.../localstore-report.tex | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
Diff of changes:
diff --git a/reports/triton-localstore-convergence/localstore-report.tex b/reports/triton-localstore-convergence/localstore-report.tex
index d4c80b7..f2b61b7 100644
--- a/reports/triton-localstore-convergence/localstore-report.tex
+++ b/reports/triton-localstore-convergence/localstore-report.tex
@@ -161,7 +161,7 @@ secondary servers. Consistency is maintained across servers using the
record-based visioning capability of HOSS.
All memory buffers used for data transfer in Figure~\ref{fig:replicate} are
-allocated and managed by an explicit buffer management component. The buffer
+allocated and managed by a separate buffer management component. The buffer
manager constrains the memory resources dedicated to I/O at any
given time. Each buffer is automatically page-aligned, and the same buffer
is passed through the ROSD, Mercury, and HOSS layers to avoid memory
@@ -200,6 +200,8 @@ stored in Triton.
\subsection{Preliminary Evaluation}
+\textcolor{red}{TODO: consider coming back and doing multithreaded baseline
+measurements as well, maybe both with linear and random I/O?}
\begin{figure}[t]
\centering
hooks/post-receive
--
1
0
See <https://jenkins-ci.mcs.anl.gov/job/triton/188/>
------------------------------------------
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on trounce.mcs.anl.gov in workspace <https://jenkins-ci.mcs.anl.gov/job/triton/ws/>
Deleting project workspace...
done
Checkout:triton / <https://jenkins-ci.mcs.anl.gov/job/triton/ws/> - hudson.remoting.Channel@63806c34:trounce.mcs.anl.gov
Using strategy: Default
Last Built Revision: Revision 9c9d7b4da56fbac8bd3b1258198026ec6d0d91e2 (origin/master)
Cloning the remote Git repository
Cloning repository [email protected]:triton
git --version
git version 1.7.9.5
Fetching upstream changes from origin
Commencing build of Revision 9c9d7b4da56fbac8bd3b1258198026ec6d0d91e2 (origin/master)
Checking out Revision 9c9d7b4da56fbac8bd3b1258198026ec6d0d91e2 (origin/master)
[triton] $ /bin/sh -xe /tmp/hudson147066274119840953.sh
+ code/scripts/jenkins/build-jenkins.sh
code
misc
sim
=======================================================================
= Build 188 2015-03-02_00-03-02
= on trounce.mcs.anl.gov [mcs trounce.mcs.anl.gov]
=======================================================================
Triton source in <https://jenkins-ci.mcs.anl.gov/job/triton/ws/>
Building in <https://jenkins-ci.mcs.anl.gov/job/triton/ws/build>
====================================================================
===== INFO =========================================================
====================================================================
Triton Source tree : <https://jenkins-ci.mcs.anl.gov/job/triton/ws/>
Workspace : <https://jenkins-ci.mcs.anl.gov/job/triton/ws/build>
Cachedir : /tmp/triton-cache
=======================================================================
==== STEP 1: Fetch build dependencies =================================
=======================================================================
openpa.tar.gz: (found in cache) OK (3ad998bb26ac84ee7de262db94dd7656)
bmi.tar.gz: (found in cache) OK (82a8efe604a80c80d18dab76dfc13c38)
boost.tar.bz2: (found in cache) OK (d6eef4b4cacb2183f2bf265a5a03a354)
c-utils.tar.gz: (cached but invalid. Removing) (fetching) Build step 'Execute shell' marked build as failure
TAP Reports Processing: START
Looking for TAP results report in workspace using pattern: build/tritonbuild/tests/results.tap
Did not find any matching files.
1
0
See <https://jenkins-ci.mcs.anl.gov/job/triton/187/>
------------------------------------------
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on trounce.mcs.anl.gov in workspace <https://jenkins-ci.mcs.anl.gov/job/triton/ws/>
Deleting project workspace...
done
Checkout:triton / <https://jenkins-ci.mcs.anl.gov/job/triton/ws/> - hudson.remoting.Channel@502b5b4b:trounce.mcs.anl.gov
Using strategy: Default
Last Built Revision: Revision 9c9d7b4da56fbac8bd3b1258198026ec6d0d91e2 (origin/master)
Cloning the remote Git repository
Cloning repository [email protected]:triton
git --version
git version 1.7.9.5
Fetching upstream changes from origin
Commencing build of Revision 9c9d7b4da56fbac8bd3b1258198026ec6d0d91e2 (origin/master)
Checking out Revision 9c9d7b4da56fbac8bd3b1258198026ec6d0d91e2 (origin/master)
[triton] $ /bin/sh -xe /tmp/hudson9000899037164993682.sh
+ code/scripts/jenkins/build-jenkins.sh
code
misc
sim
=======================================================================
= Build 187 2015-03-01_00-02-03
= on trounce.mcs.anl.gov [mcs trounce.mcs.anl.gov]
=======================================================================
Triton source in <https://jenkins-ci.mcs.anl.gov/job/triton/ws/>
Building in <https://jenkins-ci.mcs.anl.gov/job/triton/ws/build>
====================================================================
===== INFO =========================================================
====================================================================
Triton Source tree : <https://jenkins-ci.mcs.anl.gov/job/triton/ws/>
Workspace : <https://jenkins-ci.mcs.anl.gov/job/triton/ws/build>
Cachedir : /tmp/triton-cache
=======================================================================
==== STEP 1: Fetch build dependencies =================================
=======================================================================
openpa.tar.gz: (found in cache) OK (3ad998bb26ac84ee7de262db94dd7656)
bmi.tar.gz: (found in cache) OK (82a8efe604a80c80d18dab76dfc13c38)
boost.tar.bz2: (found in cache) OK (d6eef4b4cacb2183f2bf265a5a03a354)
c-utils.tar.gz: (cached but invalid. Removing) (fetching) Build step 'Execute shell' marked build as failure
TAP Reports Processing: START
Looking for TAP results report in workspace using pattern: build/tritonbuild/tests/results.tap
Did not find any matching files.
1
0