Commit 3fe8c3fc authored by Greg Williams's avatar Greg Williams
Browse files

Got overlapped IO system test running to completion, though had to disable...

Got overlapped IO system test running to completion, though had to disable logging of operation metadata, since there is an access violation that needs to be tracked down
parent 02573548
Loading
Loading
Loading
Loading
+52 −52
Original line number Diff line number Diff line
@@ -237,58 +237,58 @@ void KineticLogger_LogProtobuf(const KineticProto* proto)
                {
                    LOG_PROTO_LEVEL_START("keyValue");
                    {
                        if (proto->command->body->keyValue->has_key)
                        {
                            BYTES_TO_CSTRING(tmpBuf,
                                proto->command->body->keyValue->key, 0,
                                proto->command->body->keyValue->key.len);
                            LOGF("%skey: '%s'", _indent, tmpBuf);
                        }
                        if (proto->command->body->keyValue->has_newVersion)
                        {
                            BYTES_TO_CSTRING(tmpBuf,
                                proto->command->body->keyValue->newVersion,
                                0, proto->command->body->keyValue->newVersion.len);
                            LOGF("%snewVersion: '%s'", _indent, tmpBuf);
                        }
                        if (proto->command->body->keyValue->has_dbVersion)
                        {
                            BYTES_TO_CSTRING(tmpBuf,
                                proto->command->body->keyValue->dbVersion,
                                0, proto->command->body->keyValue->dbVersion.len);
                            LOGF("%sdbVersion: '%s'", _indent, tmpBuf);
                        }
                        if (proto->command->body->keyValue->has_tag)
                        {
                            BYTES_TO_CSTRING(tmpBuf,
                                proto->command->body->keyValue->tag,
                                0, proto->command->body->keyValue->tag.len);
                            LOGF("%stag: '%s'", _indent, tmpBuf);
                        }
                        if (proto->command->body->keyValue->has_force)
                        {
                            LOGF("%sforce: %s", _indent,
                                proto->command->body->keyValue->force ? _str_true : _str_false);
                        }
                        if (proto->command->body->keyValue->has_algorithm)
                        {
                            const ProtobufCEnumValue* eVal = protobuf_c_enum_descriptor_get_value(
                                &KineticProto_algorithm__descriptor,
                                proto->command->body->keyValue->algorithm);
                            LOGF("%salgorithm: %s", _indent, eVal->name);
                        }
                        if (proto->command->body->keyValue->has_metadataOnly)
                        {
                            LOGF("%smetadataOnly: %s", _indent,
                                proto->command->body->keyValue->metadataOnly ? _str_true : _str_false);
                        }
                        if (proto->command->body->keyValue->has_synchronization)
                        {
                            const ProtobufCEnumValue* eVal = protobuf_c_enum_descriptor_get_value(
                                &KineticProto_synchronization__descriptor,
                                proto->command->body->keyValue->synchronization);
                            LOGF("%ssynchronization: %s", _indent, eVal->name);
                        }
                        // if (proto->command->body->keyValue->has_key)
                        // {
                        //     BYTES_TO_CSTRING(tmpBuf,
                        //         proto->command->body->keyValue->key, 0,
                        //         proto->command->body->keyValue->key.len);
                        //     LOGF("%skey: '%s'", _indent, tmpBuf);
                        // }
                        // if (proto->command->body->keyValue->has_newVersion)
                        // {
                        //     BYTES_TO_CSTRING(tmpBuf,
                        //         proto->command->body->keyValue->newVersion,
                        //         0, proto->command->body->keyValue->newVersion.len);
                        //     LOGF("%snewVersion: '%s'", _indent, tmpBuf);
                        // }
                        // if (proto->command->body->keyValue->has_dbVersion)
                        // {
                        //     BYTES_TO_CSTRING(tmpBuf,
                        //         proto->command->body->keyValue->dbVersion,
                        //         0, proto->command->body->keyValue->dbVersion.len);
                        //     LOGF("%sdbVersion: '%s'", _indent, tmpBuf);
                        // }
                        // if (proto->command->body->keyValue->has_tag)
                        // {
                        //     BYTES_TO_CSTRING(tmpBuf,
                        //         proto->command->body->keyValue->tag,
                        //         0, proto->command->body->keyValue->tag.len);
                        //     LOGF("%stag: '%s'", _indent, tmpBuf);
                        // }
                        // if (proto->command->body->keyValue->has_force)
                        // {
                        //     LOGF("%sforce: %s", _indent,
                        //         proto->command->body->keyValue->force ? _str_true : _str_false);
                        // }
                        // if (proto->command->body->keyValue->has_algorithm)
                        // {
                        //     const ProtobufCEnumValue* eVal = protobuf_c_enum_descriptor_get_value(
                        //         &KineticProto_algorithm__descriptor,
                        //         proto->command->body->keyValue->algorithm);
                        //     LOGF("%salgorithm: %s", _indent, eVal->name);
                        // }
                        // if (proto->command->body->keyValue->has_metadataOnly)
                        // {
                        //     LOGF("%smetadataOnly: %s", _indent,
                        //         proto->command->body->keyValue->metadataOnly ? _str_true : _str_false);
                        // }
                        // if (proto->command->body->keyValue->has_synchronization)
                        // {
                        //     const ProtobufCEnumValue* eVal = protobuf_c_enum_descriptor_get_value(
                        //         &KineticProto_synchronization__descriptor,
                        //         proto->command->body->keyValue->synchronization);
                        //     LOGF("%ssynchronization: %s", _indent, eVal->name);
                        // }
                    }
                    LOG_PROTO_LEVEL_END();
                }
+26.7 MiB (26.7 MiB)

File changed.

No diff preview for this file type.

+4 −5
Original line number Diff line number Diff line
@@ -53,16 +53,16 @@ void *kinetic_put(void *kinetic_arg)
		memset(key, 0, sizeof(key));
		sprintf((char*)key, "%s_%02d", arg->oid, objIndex);
		metaData->key = (ByteArray){.data = key, .len = sizeof(key)};
		int objectLen = arg->data.array.len - arg->data.bytesUsed;
		int bytesRemaining = arg->data.array.len - arg->data.bytesUsed;
		metaData->value = (ByteArray) {
			.data = &(arg->data.array.data[objIndex * KINETIC_OBJ_SIZE]),
			.len = (objectLen > KINETIC_OBJ_SIZE) ? KINETIC_OBJ_SIZE : objectLen,
			.len = (bytesRemaining > KINETIC_OBJ_SIZE) ? KINETIC_OBJ_SIZE : bytesRemaining,
		};
		arg->data.bytesUsed += metaData->value.len;

		// Store the data slice
		LOGF("Storing a data slice (%u bytes)", metaData->value.len);
		KineticStatus status = KineticClient_Put(arg->sessionHandle, metaData);
		// sprintf(message, "KineticClient put to disk failed, ip:%s", arg->ip);
		TEST_ASSERT_EQUAL_STATUS(KINETIC_STATUS_SUCCESS, status);
		LOGF("KineticClient put to disk success, ip:%s", arg->ip);

@@ -87,7 +87,7 @@ void test_kinetic_client_should_be_able_to_store_an_arbitrarily_large_binary_obj

	for (int iteration = 0; iteration < maxIterations; iteration++) {

		LOGF("Overlapped PUT operations (iteration %d of %d)", iteration, maxIterations);
		LOGF("Overlapped PUT operations (iteration %d of %d)", iteration+1, maxIterations);
		const int numCopiesToStore = 1;
		int fd, dataLen, i;

@@ -140,7 +140,6 @@ void test_kinetic_client_should_be_able_to_store_an_arbitrarily_large_binary_obj
			int err_ret = pthread_join(thread_id[i], NULL);
			TEST_ASSERT_EQUAL_MESSAGE(0, err_ret, "pthread join failed");
			KineticClient_Disconnect(&kinetic_client[i]);
			free(&kinetic_client[i]);
		}

		// Cleanup the rest of the reources