An indentifier must be set before calling LOG_TRANSACTION

This commit is contained in:
Evan Tschannen 2020-05-07 11:18:03 -07:00
parent ad900135dd
commit 9ccc417a4f
1 changed files with 2 additions and 2 deletions

View File

@ -3029,7 +3029,7 @@ void Transaction::setOption( FDBTransactionOptions::Option option, Optional<Stri
case FDBTransactionOptions::DEBUG_TRANSACTION_IDENTIFIER:
validateOptionValue(value, true);
if (value.get().size() > 100) {
if (value.get().size() > 100 || value.get().size() == 0) {
throw invalid_option_value();
}
@ -3056,7 +3056,7 @@ void Transaction::setOption( FDBTransactionOptions::Option option, Optional<Stri
case FDBTransactionOptions::LOG_TRANSACTION:
validateOptionValue(value, false);
if (trLogInfo) {
if (trLogInfo && !trLogInfo->identifier.empty()) {
trLogInfo->logTo(TransactionLogInfo::TRACE_LOG);
}
else {