From 2f85ee360a8273020824c7f8b6c9aabefe737cb7 Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Thu, 4 Jun 2020 17:18:25 -0700 Subject: [PATCH 01/10] Watches could return future_version errors unnecessarily --- fdbserver/storageserver.actor.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/fdbserver/storageserver.actor.cpp b/fdbserver/storageserver.actor.cpp index 57691bdbb5..7ebedb11f0 100644 --- a/fdbserver/storageserver.actor.cpp +++ b/fdbserver/storageserver.actor.cpp @@ -923,16 +923,18 @@ ACTOR Future watchValue_impl( StorageServer* data, WatchValueRequest req ) if( req.debugID.present() ) g_traceBatch.addEvent("WatchValueDebug", req.debugID.get().first(), "watchValueQ.AfterVersion"); //.detail("TaskID", g_network->getCurrentTask()); + state Version minVersion = data->data().latestVersion; loop { try { - state Version latest = data->data().latestVersion; state Future watchFuture = data->watches.onChange(req.key); + state Version latest = data->version.get(); GetValueRequest getReq( req.key, latest, req.debugID ); state Future getValue = getValueQ( data, getReq ); //we are relying on the delay zero at the top of getValueQ, if removed we need one here GetValueReply reply = wait( getReq.reply.getFuture() ); //TraceEvent("WatcherCheckValue").detail("Key", req.key ).detail("Value", req.value ).detail("CurrentValue", v ).detail("Ver", latest); if(reply.error.present()) { + ASSERT(reply.error.get().code() != error_code_future_version); throw reply.error.get(); } @@ -955,7 +957,13 @@ ACTOR Future watchValue_impl( StorageServer* data, WatchValueRequest req ) ++data->numWatches; data->watchBytes += ( req.key.expectedSize() + req.value.expectedSize() + 1000 ); try { - wait( watchFuture ); + if(latest < minVersion) { + // If the version we read is less than minVersion, then we may fail to be notified of any changes that occur up to or including minVersion + // To prevent that, we'll check the key again once the version reaches our minVersion + watchFuture = watchFuture || data->version.whenAtLeast(minVersion); + } + wait(watchFuture); + wait(data->version.whenAtLeast(data->data().latestVersion)); --data->numWatches; data->watchBytes -= ( req.key.expectedSize() + req.value.expectedSize() + 1000 ); } catch( Error &e ) { From c00e6e7ad98ae0c3d8f9a302eacac4915d5a7e16 Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Fri, 5 Jun 2020 11:24:47 -0700 Subject: [PATCH 02/10] Reorder call to setting up watch future with waiting for data->version to advance to avoid missing potential mutations. Also add tests for and fix the case where reading the value throws a transaction_too_old error. --- fdbserver/storageserver.actor.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/fdbserver/storageserver.actor.cpp b/fdbserver/storageserver.actor.cpp index 7ebedb11f0..ee357df8c9 100644 --- a/fdbserver/storageserver.actor.cpp +++ b/fdbserver/storageserver.actor.cpp @@ -924,10 +924,11 @@ ACTOR Future watchValue_impl( StorageServer* data, WatchValueRequest req ) g_traceBatch.addEvent("WatchValueDebug", req.debugID.get().first(), "watchValueQ.AfterVersion"); //.detail("TaskID", g_network->getCurrentTask()); state Version minVersion = data->data().latestVersion; + state Future watchFuture = data->watches.onChange(req.key); loop { try { - state Future watchFuture = data->watches.onChange(req.key); state Version latest = data->version.get(); + TEST(latest >= minVersion && latest < data->data().latestVersion); // Starting watch loop with latestVersion > data->version GetValueRequest getReq( req.key, latest, req.debugID ); state Future getValue = getValueQ( data, getReq ); //we are relying on the delay zero at the top of getValueQ, if removed we need one here GetValueReply reply = wait( getReq.reply.getFuture() ); @@ -937,6 +938,9 @@ ACTOR Future watchValue_impl( StorageServer* data, WatchValueRequest req ) ASSERT(reply.error.get().code() != error_code_future_version); throw reply.error.get(); } + if(BUGGIFY) { + throw transaction_too_old(); + } debugMutation("ShardWatchValue", latest, MutationRef(MutationRef::DebugKey, req.key, reply.value.present() ? StringRef( reply.value.get() ) : LiteralStringRef("") ) ); @@ -962,8 +966,11 @@ ACTOR Future watchValue_impl( StorageServer* data, WatchValueRequest req ) // To prevent that, we'll check the key again once the version reaches our minVersion watchFuture = watchFuture || data->version.whenAtLeast(minVersion); } + if(BUGGIFY) { + // Simulate a trigger on the watch that results in the loop going around without the value changing + watchFuture = watchFuture || delay(deterministicRandom()->random01()); + } wait(watchFuture); - wait(data->version.whenAtLeast(data->data().latestVersion)); --data->numWatches; data->watchBytes -= ( req.key.expectedSize() + req.value.expectedSize() + 1000 ); } catch( Error &e ) { @@ -972,9 +979,15 @@ ACTOR Future watchValue_impl( StorageServer* data, WatchValueRequest req ) throw; } } catch( Error &e ) { - if( e.code() != error_code_transaction_too_old ) + if( e.code() != error_code_transaction_too_old ) { throw; + } + + TEST(true); // Reading a watched key failed with transaction_too_old } + + watchFuture = data->watches.onChange(req.key); + wait(data->version.whenAtLeast(data->data().latestVersion)); } } catch (Error& e) { if(!canReplyWith(e)) From e10704fd76138c6519a4bf743d7698b43f9eb9df Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Tue, 9 Jun 2020 14:56:21 -0700 Subject: [PATCH 03/10] Cherry-pick region related status changes from 6.3 --- fdbcli/fdbcli.actor.cpp | 71 ++++++++++++++++++++++++++++++++++++++ fdbclient/Schemas.cpp | 1 + fdbserver/Status.actor.cpp | 40 +++++++++++++++++++-- 3 files changed, 110 insertions(+), 2 deletions(-) diff --git a/fdbcli/fdbcli.actor.cpp b/fdbcli/fdbcli.actor.cpp index 8e2ad1319d..5d685c1400 100644 --- a/fdbcli/fdbcli.actor.cpp +++ b/fdbcli/fdbcli.actor.cpp @@ -945,7 +945,11 @@ void printStatus(StatusObjectReader statusObj, StatusClient::StatusLevel level, StatusObjectReader statusObjConfig; StatusArray excludedServersArr; + Optional activePrimaryDC; + if (statusObjCluster.has("active_primary_dc")) { + activePrimaryDC = statusObjCluster["active_primary_dc"].get_str(); + } if (statusObjCluster.get("configuration", statusObjConfig)) { if (statusObjConfig.has("excluded_servers")) excludedServersArr = statusObjConfig.last().get_array(); @@ -1001,6 +1005,73 @@ void printStatus(StatusObjectReader statusObj, StatusClient::StatusLevel level, if (statusObjConfig.get("log_routers", intVal)) outputString += format("\n Desired Log Routers - %d", intVal); + + outputString += "\n Usable Regions - "; + if (statusObjConfig.get("usable_regions", intVal)) { + outputString += std::to_string(intVal); + } else { + outputString += "unknown"; + } + + StatusArray regions; + if (statusObjConfig.has("regions")) { + outputString += "\n Regions: "; + regions = statusObjConfig["regions"].get_array(); + bool isPrimary = false; + std::vector regionSatelliteDCs; + std::string regionDC; + for (StatusObjectReader region : regions) { + for (StatusObjectReader dc : region["datacenters"].get_array()) { + if (!dc.has("satellite")) { + regionDC = dc["id"].get_str(); + if (activePrimaryDC.present() && dc["id"].get_str() == activePrimaryDC.get()) { + isPrimary = true; + } + } else if (dc["satellite"].get_int() == 1) { + regionSatelliteDCs.push_back(dc["id"].get_str()); + } + } + if (activePrimaryDC.present()) { + if (isPrimary) { + outputString += "\n Primary -"; + } else { + outputString += "\n Remote -"; + } + } else { + outputString += "\n Region -"; + } + outputString += format("\n Datacenter - %s", regionDC.c_str()); + if (regionSatelliteDCs.size() > 0) { + outputString += "\n Satellite datacenters - "; + for (int i = 0; i < regionSatelliteDCs.size(); i++) { + if (i != regionSatelliteDCs.size() - 1) { + outputString += format("%s, ", regionSatelliteDCs[i].c_str()); + } else { + outputString += format("%s", regionSatelliteDCs[i].c_str()); + } + } + } + isPrimary = false; + if (region.get("satellite_redundancy_mode", strVal)) { + outputString += format("\n Satellite Redundancy Mode - %s", strVal.c_str()); + } + if (region.get("satellite_anti_quorum", intVal)) { + outputString += format("\n Satellite Anti Quorum - %d", intVal); + } + if (region.get("satellite_logs", intVal)) { + outputString += format("\n Satellite Logs - %d", intVal); + } + if (region.get("satellite_log_policy", strVal)) { + outputString += format("\n Satellite Log Policy - %s", strVal.c_str()); + } + if (region.get("satellite_log_replicas", intVal)) { + outputString += format("\n Satellite Log Replicas - %d", intVal); + } + if (region.get("satellite_usable_dcs", intVal)) { + outputString += format("\n Satellite Usable DCs - %d", intVal); + } + } + } } catch (std::runtime_error& ) { outputString = outputStringCache; diff --git a/fdbclient/Schemas.cpp b/fdbclient/Schemas.cpp index c8c26d158f..b9c8c34d0c 100644 --- a/fdbclient/Schemas.cpp +++ b/fdbclient/Schemas.cpp @@ -520,6 +520,7 @@ const KeyRef JSONSchemas::statusSchema = LiteralStringRef(R"statusSchema( "data_distribution_disabled_for_ss_failures":true, "data_distribution_disabled_for_rebalance":true, "data_distribution_disabled":true, + "active_primary_dc":"pv", "configuration":{ "log_anti_quorum":0, "log_replicas":2, diff --git a/fdbserver/Status.actor.cpp b/fdbserver/Status.actor.cpp index 25cd246693..72ade55b7f 100644 --- a/fdbserver/Status.actor.cpp +++ b/fdbserver/Status.actor.cpp @@ -2145,6 +2145,35 @@ ACTOR Future lockedStatusFetcher(Reference> getActivePrimaryDC(Database cx, JsonBuilderArray* messages) { + state ReadYourWritesTransaction tr(cx); + + state Future readTimeout = delay(5); // so that we won't loop forever + loop { + try { + if (readTimeout.isReady()) { + throw timed_out(); + } + tr.setOption(FDBTransactionOptions::READ_SYSTEM_KEYS); + tr.setOption(FDBTransactionOptions::PRIORITY_SYSTEM_IMMEDIATE); + Optional res = wait(timeoutError(tr.get(primaryDatacenterKey), 5)); + if (!res.present()) { + messages->push_back( + JsonString::makeMessage("primary_dc_missing", "Unable to determine primary datacenter.")); + } + return res; + } catch (Error& e) { + if (e.code() == error_code_timed_out) { + messages->push_back( + JsonString::makeMessage("fetch_primary_dc_timedout", "Fetching primary DC timed out.")); + return Optional(); + } else { + wait(tr.onError(e)); + } + } + } +} + // constructs the cluster section of the json status output ACTOR Future clusterGetStatus( Reference>> db, @@ -2323,6 +2352,7 @@ ACTOR Future clusterGetStatus( state Future>>> proxyFuture = errorOr(getProxiesAndMetrics(db, address_workers)); state int minReplicasRemaining = -1; + state Future> primaryDCFO = getActivePrimaryDC(cx, &messages); std::vector> futures2; futures2.push_back(dataStatusFetcher(ddWorker, configuration.get(), &minReplicasRemaining)); futures2.push_back(workloadStatusFetcher(db, workers, mWorker, rkWorker, &qos, &data_overlay, &status_incomplete_reasons, storageServerFuture)); @@ -2341,11 +2371,17 @@ ACTOR Future clusterGetStatus( statusObj["fault_tolerance"] = faultToleranceStatusFetcher(configuration.get(), coordinators, workers, extraTlogEligibleZones, minReplicasRemaining, loadResult.present() && loadResult.get().healthyZone.present()); } - JsonBuilderObject configObj = configurationFetcher(configuration, coordinators, &status_incomplete_reasons); + state JsonBuilderObject configObj = + configurationFetcher(configuration, coordinators, &status_incomplete_reasons); + wait(success(primaryDCFO)); + if (primaryDCFO.get().present()) { + statusObj["active_primary_dc"] = primaryDCFO.get().get(); + } // configArr could be empty - if (!configObj.empty()) + if (!configObj.empty()) { statusObj["configuration"] = configObj; + } // workloadStatusFetcher returns the workload section but also optionally writes the qos section and adds to the data_overlay object if (!workerStatuses[1].empty()) From 9bc7eaf55a807b205eea169255d2d1c68fb579c7 Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Tue, 9 Jun 2020 14:57:14 -0700 Subject: [PATCH 04/10] Add missing status field to documentation --- documentation/sphinx/source/mr-status-json-schemas.rst.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/documentation/sphinx/source/mr-status-json-schemas.rst.inc b/documentation/sphinx/source/mr-status-json-schemas.rst.inc index d66ed516bb..479ecfab47 100644 --- a/documentation/sphinx/source/mr-status-json-schemas.rst.inc +++ b/documentation/sphinx/source/mr-status-json-schemas.rst.inc @@ -494,6 +494,7 @@ "data_distribution_disabled_for_ss_failures":true, "data_distribution_disabled_for_rebalance":true, "data_distribution_disabled":true, + "active_primary_dc":"pv", "configuration":{ "log_anti_quorum":0, "log_replicas":2, From c3c1fd5a471d1d298e0e22446aa931442b5020e0 Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Tue, 9 Jun 2020 16:13:36 -0700 Subject: [PATCH 05/10] Add a release note. --- documentation/sphinx/source/release-notes.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/documentation/sphinx/source/release-notes.rst b/documentation/sphinx/source/release-notes.rst index 34ef860311..8c877a92b3 100644 --- a/documentation/sphinx/source/release-notes.rst +++ b/documentation/sphinx/source/release-notes.rst @@ -2,6 +2,14 @@ Release Notes ############# +6.2.23 +====== + +Status +------ + +* Added ``cluster.active_primary_dc`` that indicates which datacenter is serving as the primary datacenter in multi-region setups. `(PR #3320) `_ + 6.2.22 ====== From c5e2accdaa2119038c474dc18bdfef9d3e2cdefe Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Wed, 10 Jun 2020 11:22:02 -0700 Subject: [PATCH 06/10] Add a missing release note to 6.2.21 --- documentation/sphinx/source/release-notes.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/documentation/sphinx/source/release-notes.rst b/documentation/sphinx/source/release-notes.rst index 34ef860311..84ce055aef 100644 --- a/documentation/sphinx/source/release-notes.rst +++ b/documentation/sphinx/source/release-notes.rst @@ -21,6 +21,7 @@ Fixes * ``fdbrestore`` prefix options required exactly a single hyphen instead of the standard two. `(PR #3056) `_ * Commits could stall on a newly elected proxy because of inaccurate compute estimates. `(PR #3123) `_ * A transaction class process with a bad disk could be repeatedly recruited as a transaction log. `(PR #3268) `_ +* Fix a potential race condition that could lead to undefined behavior when connecting to a database using the multi-version client API. `(PR #3265) `_ Features -------- From 49a1feaa76767059a8a72bf9d1f8b5f9daac3ecd Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Wed, 10 Jun 2020 14:13:12 -0700 Subject: [PATCH 07/10] Fix unrelated bug in an ASSERT that breaks the windows compile and is already fixed in release-6.3. --- fdbserver/workloads/TriggerRecovery.actor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdbserver/workloads/TriggerRecovery.actor.cpp b/fdbserver/workloads/TriggerRecovery.actor.cpp index 31682caf6a..0b4e094849 100644 --- a/fdbserver/workloads/TriggerRecovery.actor.cpp +++ b/fdbserver/workloads/TriggerRecovery.actor.cpp @@ -19,7 +19,7 @@ struct TriggerRecoveryLoopWorkload : TestWorkload { numRecoveries = getOption(options, LiteralStringRef("numRecoveries"), deterministicRandom()->randomInt(1, 10)); delayBetweenRecoveries = getOption(options, LiteralStringRef("delayBetweenRecoveries"), 0.0); killAllProportion = getOption(options, LiteralStringRef("killAllProportion"), 0.1); - ASSERT(numRecoveries > 0 && startTime >= 0 and delayBetweenRecoveries >= 0); + ASSERT((numRecoveries > 0) && (startTime >= 0) && (delayBetweenRecoveries >= 0)); TraceEvent(SevInfo, "TriggerRecoveryLoopSetup") .detail("StartTime", startTime) .detail("NumRecoveries", numRecoveries) From 94b9732da1628a26705a7deb73b02c0b8630b36c Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Wed, 17 Jun 2020 11:49:28 -0700 Subject: [PATCH 08/10] Move all release notes into a single folder. The current release notes now has a ref link at the top. --- documentation/sphinx/source/api-python.rst | 2 +- documentation/sphinx/source/api-ruby.rst | 2 +- .../source/api-version-upgrade-guide.rst | 2 +- documentation/sphinx/source/client-design.rst | 3 +- .../sphinx/source/earlier-release-notes.rst | 2 +- documentation/sphinx/source/index.rst | 2 +- .../release-notes-014.rst | 0 .../release-notes-016.rst | 0 .../release-notes-021.rst | 0 .../release-notes-022.rst | 0 .../release-notes-023.rst | 0 .../release-notes-100.rst | 0 .../release-notes-200.rst | 0 .../release-notes-300.rst | 0 .../release-notes-400.rst | 0 .../release-notes-410.rst | 0 .../release-notes-420.rst | 0 .../release-notes-430.rst | 0 .../release-notes-440.rst | 0 .../release-notes-450.rst | 0 .../release-notes-460.rst | 28 ++++++------- .../release-notes-500.rst | 30 ++++++------- .../release-notes-510.rst | 32 +++++++------- .../release-notes-520.rst | 34 +++++++-------- .../release-notes-600.rst | 36 ++++++++-------- .../release-notes-610.rst | 38 ++++++++--------- .../release-notes-620.rst} | 42 ++++++++++--------- 27 files changed, 127 insertions(+), 126 deletions(-) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-014.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-016.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-021.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-022.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-023.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-100.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-200.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-300.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-400.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-410.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-420.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-430.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-440.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-450.rst (100%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-460.rst (84%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-500.rst (89%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-510.rst (91%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-520.rst (83%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-600.rst (92%) rename documentation/sphinx/source/{old-release-notes => release-notes}/release-notes-610.rst (94%) rename documentation/sphinx/source/{release-notes.rst => release-notes/release-notes-620.rst} (95%) diff --git a/documentation/sphinx/source/api-python.rst b/documentation/sphinx/source/api-python.rst index d332e3c2a2..650a96fa93 100644 --- a/documentation/sphinx/source/api-python.rst +++ b/documentation/sphinx/source/api-python.rst @@ -98,7 +98,7 @@ When you import the ``fdb`` module, it exposes only one useful symbol: .. warning:: |api-version-multi-version-warning| -For API changes between version 13 and |api-version| (for the purpose of porting older programs), see :doc:`release-notes` and :doc:`api-version-upgrade-guide`. +For API changes between version 13 and |api-version| (for the purpose of porting older programs), see :ref:`release-notes` and :doc:`api-version-upgrade-guide`. Opening a database ================== diff --git a/documentation/sphinx/source/api-ruby.rst b/documentation/sphinx/source/api-ruby.rst index cd980e4088..f57319218b 100644 --- a/documentation/sphinx/source/api-ruby.rst +++ b/documentation/sphinx/source/api-ruby.rst @@ -87,7 +87,7 @@ When you require the ``FDB`` gem, it exposes only one useful method: .. warning:: |api-version-multi-version-warning| -For API changes between version 14 and |api-version| (for the purpose of porting older programs), see :doc:`release-notes` and :doc:`api-version-upgrade-guide`. +For API changes between version 14 and |api-version| (for the purpose of porting older programs), see :ref:`release-notes` and :doc:`api-version-upgrade-guide`. Opening a database ================== diff --git a/documentation/sphinx/source/api-version-upgrade-guide.rst b/documentation/sphinx/source/api-version-upgrade-guide.rst index eab7f8b6a2..e443a78a4b 100644 --- a/documentation/sphinx/source/api-version-upgrade-guide.rst +++ b/documentation/sphinx/source/api-version-upgrade-guide.rst @@ -213,4 +213,4 @@ Java bindings Older API versions ================== -API versions from the beta and alpha releases of Foundationdb (pre-100) are not documented here. See :doc:`old-release-notes/release-notes-023` for details about changes in those releases. +API versions from the beta and alpha releases of Foundationdb (pre-100) are not documented here. See :doc:`release-notes/release-notes-023` for details about changes in those releases. diff --git a/documentation/sphinx/source/client-design.rst b/documentation/sphinx/source/client-design.rst index c9706f0f46..640736a688 100644 --- a/documentation/sphinx/source/client-design.rst +++ b/documentation/sphinx/source/client-design.rst @@ -2,7 +2,7 @@ Client Design ############# -FoundationDB supports language bindings for application development using the ordered key-value store. The following documents cover use of the bindings, from getting started and design principles to best practices and data modeling. The latest changes are detailed in :doc:`release-notes`. +FoundationDB supports language bindings for application development using the ordered key-value store. The following documents cover use of the bindings, from getting started and design principles to best practices and data modeling. The latest changes are detailed in :ref:`release-notes`. * :doc:`getting-started-mac` explains how to install a local FoundationDB server suitable for development on macOS. @@ -27,7 +27,6 @@ FoundationDB supports language bindings for application development using the or :titlesonly: :hidden: - release-notes getting-started-mac getting-started-linux downloads diff --git a/documentation/sphinx/source/earlier-release-notes.rst b/documentation/sphinx/source/earlier-release-notes.rst index 4ccbe1f59f..245cd17d31 100644 --- a/documentation/sphinx/source/earlier-release-notes.rst +++ b/documentation/sphinx/source/earlier-release-notes.rst @@ -12,4 +12,4 @@ were used to track the feature's development. :maxdepth: 1 :glob: - old-release-notes/* + release-notes/* diff --git a/documentation/sphinx/source/index.rst b/documentation/sphinx/source/index.rst index d86bb09757..737731d36e 100644 --- a/documentation/sphinx/source/index.rst +++ b/documentation/sphinx/source/index.rst @@ -22,7 +22,7 @@ FoundationDB is a robust choice for a broad range of use cases: **FoundationDB supports flexible application architectures.** Your application can talk directly to FoundationDB, to a layer, or both. Layers provide new capability on top of FoundationDB but are stateless. -The latest changes are detailed in :doc:`release-notes`. The documentation has the following sections: +The latest changes are detailed in :ref:`release-notes`. The documentation has the following sections: * :doc:`why-foundationdb` describes the technical alternatives involved in NoSQL database design and explains the advantages of transaction processing at scale. diff --git a/documentation/sphinx/source/old-release-notes/release-notes-014.rst b/documentation/sphinx/source/release-notes/release-notes-014.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-014.rst rename to documentation/sphinx/source/release-notes/release-notes-014.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-016.rst b/documentation/sphinx/source/release-notes/release-notes-016.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-016.rst rename to documentation/sphinx/source/release-notes/release-notes-016.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-021.rst b/documentation/sphinx/source/release-notes/release-notes-021.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-021.rst rename to documentation/sphinx/source/release-notes/release-notes-021.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-022.rst b/documentation/sphinx/source/release-notes/release-notes-022.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-022.rst rename to documentation/sphinx/source/release-notes/release-notes-022.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-023.rst b/documentation/sphinx/source/release-notes/release-notes-023.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-023.rst rename to documentation/sphinx/source/release-notes/release-notes-023.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-100.rst b/documentation/sphinx/source/release-notes/release-notes-100.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-100.rst rename to documentation/sphinx/source/release-notes/release-notes-100.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-200.rst b/documentation/sphinx/source/release-notes/release-notes-200.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-200.rst rename to documentation/sphinx/source/release-notes/release-notes-200.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-300.rst b/documentation/sphinx/source/release-notes/release-notes-300.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-300.rst rename to documentation/sphinx/source/release-notes/release-notes-300.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-400.rst b/documentation/sphinx/source/release-notes/release-notes-400.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-400.rst rename to documentation/sphinx/source/release-notes/release-notes-400.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-410.rst b/documentation/sphinx/source/release-notes/release-notes-410.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-410.rst rename to documentation/sphinx/source/release-notes/release-notes-410.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-420.rst b/documentation/sphinx/source/release-notes/release-notes-420.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-420.rst rename to documentation/sphinx/source/release-notes/release-notes-420.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-430.rst b/documentation/sphinx/source/release-notes/release-notes-430.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-430.rst rename to documentation/sphinx/source/release-notes/release-notes-430.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-440.rst b/documentation/sphinx/source/release-notes/release-notes-440.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-440.rst rename to documentation/sphinx/source/release-notes/release-notes-440.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-450.rst b/documentation/sphinx/source/release-notes/release-notes-450.rst similarity index 100% rename from documentation/sphinx/source/old-release-notes/release-notes-450.rst rename to documentation/sphinx/source/release-notes/release-notes-450.rst diff --git a/documentation/sphinx/source/old-release-notes/release-notes-460.rst b/documentation/sphinx/source/release-notes/release-notes-460.rst similarity index 84% rename from documentation/sphinx/source/old-release-notes/release-notes-460.rst rename to documentation/sphinx/source/release-notes/release-notes-460.rst index 217ac141c9..c581a0731c 100644 --- a/documentation/sphinx/source/old-release-notes/release-notes-460.rst +++ b/documentation/sphinx/source/release-notes/release-notes-460.rst @@ -119,17 +119,17 @@ Status Earlier release notes --------------------- -* :doc:`4.5 (API Version 450) ` -* :doc:`4.4 (API Version 440) ` -* :doc:`4.3 (API Version 430) ` -* :doc:`4.2 (API Version 420) ` -* :doc:`4.1 (API Version 410) ` -* :doc:`4.0 (API Version 400) ` -* :doc:`3.0 (API Version 300) ` -* :doc:`2.0 (API Version 200) ` -* :doc:`1.0 (API Version 100) ` -* :doc:`Beta 3 (API Version 23) ` -* :doc:`Beta 2 (API Version 22) ` -* :doc:`Beta 1 (API Version 21) ` -* :doc:`Alpha 6 (API Version 16) ` -* :doc:`Alpha 5 (API Version 14) ` +* :doc:`4.5 (API Version 450) ` +* :doc:`4.4 (API Version 440) ` +* :doc:`4.3 (API Version 430) ` +* :doc:`4.2 (API Version 420) ` +* :doc:`4.1 (API Version 410) ` +* :doc:`4.0 (API Version 400) ` +* :doc:`3.0 (API Version 300) ` +* :doc:`2.0 (API Version 200) ` +* :doc:`1.0 (API Version 100) ` +* :doc:`Beta 3 (API Version 23) ` +* :doc:`Beta 2 (API Version 22) ` +* :doc:`Beta 1 (API Version 21) ` +* :doc:`Alpha 6 (API Version 16) ` +* :doc:`Alpha 5 (API Version 14) ` diff --git a/documentation/sphinx/source/old-release-notes/release-notes-500.rst b/documentation/sphinx/source/release-notes/release-notes-500.rst similarity index 89% rename from documentation/sphinx/source/old-release-notes/release-notes-500.rst rename to documentation/sphinx/source/release-notes/release-notes-500.rst index 600a8ff727..13b6b8ead1 100644 --- a/documentation/sphinx/source/old-release-notes/release-notes-500.rst +++ b/documentation/sphinx/source/release-notes/release-notes-500.rst @@ -173,18 +173,18 @@ Other Changes Earlier release notes --------------------- -* :doc:`4.6 (API Version 460) ` -* :doc:`4.5 (API Version 450) ` -* :doc:`4.4 (API Version 440) ` -* :doc:`4.3 (API Version 430) ` -* :doc:`4.2 (API Version 420) ` -* :doc:`4.1 (API Version 410) ` -* :doc:`4.0 (API Version 400) ` -* :doc:`3.0 (API Version 300) ` -* :doc:`2.0 (API Version 200) ` -* :doc:`1.0 (API Version 100) ` -* :doc:`Beta 3 (API Version 23) ` -* :doc:`Beta 2 (API Version 22) ` -* :doc:`Beta 1 (API Version 21) ` -* :doc:`Alpha 6 (API Version 16) ` -* :doc:`Alpha 5 (API Version 14) ` +* :doc:`4.6 (API Version 460) ` +* :doc:`4.5 (API Version 450) ` +* :doc:`4.4 (API Version 440) ` +* :doc:`4.3 (API Version 430) ` +* :doc:`4.2 (API Version 420) ` +* :doc:`4.1 (API Version 410) ` +* :doc:`4.0 (API Version 400) ` +* :doc:`3.0 (API Version 300) ` +* :doc:`2.0 (API Version 200) ` +* :doc:`1.0 (API Version 100) ` +* :doc:`Beta 3 (API Version 23) ` +* :doc:`Beta 2 (API Version 22) ` +* :doc:`Beta 1 (API Version 21) ` +* :doc:`Alpha 6 (API Version 16) ` +* :doc:`Alpha 5 (API Version 14) ` diff --git a/documentation/sphinx/source/old-release-notes/release-notes-510.rst b/documentation/sphinx/source/release-notes/release-notes-510.rst similarity index 91% rename from documentation/sphinx/source/old-release-notes/release-notes-510.rst rename to documentation/sphinx/source/release-notes/release-notes-510.rst index beff87cc3a..8e3fc54063 100644 --- a/documentation/sphinx/source/old-release-notes/release-notes-510.rst +++ b/documentation/sphinx/source/release-notes/release-notes-510.rst @@ -196,19 +196,19 @@ Other Changes Earlier release notes --------------------- -* :doc:`5.0 (API Version 500) ` -* :doc:`4.6 (API Version 460) ` -* :doc:`4.5 (API Version 450) ` -* :doc:`4.4 (API Version 440) ` -* :doc:`4.3 (API Version 430) ` -* :doc:`4.2 (API Version 420) ` -* :doc:`4.1 (API Version 410) ` -* :doc:`4.0 (API Version 400) ` -* :doc:`3.0 (API Version 300) ` -* :doc:`2.0 (API Version 200) ` -* :doc:`1.0 (API Version 100) ` -* :doc:`Beta 3 (API Version 23) ` -* :doc:`Beta 2 (API Version 22) ` -* :doc:`Beta 1 (API Version 21) ` -* :doc:`Alpha 6 (API Version 16) ` -* :doc:`Alpha 5 (API Version 14) ` +* :doc:`5.0 (API Version 500) ` +* :doc:`4.6 (API Version 460) ` +* :doc:`4.5 (API Version 450) ` +* :doc:`4.4 (API Version 440) ` +* :doc:`4.3 (API Version 430) ` +* :doc:`4.2 (API Version 420) ` +* :doc:`4.1 (API Version 410) ` +* :doc:`4.0 (API Version 400) ` +* :doc:`3.0 (API Version 300) ` +* :doc:`2.0 (API Version 200) ` +* :doc:`1.0 (API Version 100) ` +* :doc:`Beta 3 (API Version 23) ` +* :doc:`Beta 2 (API Version 22) ` +* :doc:`Beta 1 (API Version 21) ` +* :doc:`Alpha 6 (API Version 16) ` +* :doc:`Alpha 5 (API Version 14) ` diff --git a/documentation/sphinx/source/old-release-notes/release-notes-520.rst b/documentation/sphinx/source/release-notes/release-notes-520.rst similarity index 83% rename from documentation/sphinx/source/old-release-notes/release-notes-520.rst rename to documentation/sphinx/source/release-notes/release-notes-520.rst index 3ea8818aee..dadb1e04f2 100644 --- a/documentation/sphinx/source/old-release-notes/release-notes-520.rst +++ b/documentation/sphinx/source/release-notes/release-notes-520.rst @@ -99,20 +99,20 @@ Other Changes Earlier release notes --------------------- -* :doc:`5.1 (API Version 510) ` -* :doc:`5.0 (API Version 500) ` -* :doc:`4.6 (API Version 460) ` -* :doc:`4.5 (API Version 450) ` -* :doc:`4.4 (API Version 440) ` -* :doc:`4.3 (API Version 430) ` -* :doc:`4.2 (API Version 420) ` -* :doc:`4.1 (API Version 410) ` -* :doc:`4.0 (API Version 400) ` -* :doc:`3.0 (API Version 300) ` -* :doc:`2.0 (API Version 200) ` -* :doc:`1.0 (API Version 100) ` -* :doc:`Beta 3 (API Version 23) ` -* :doc:`Beta 2 (API Version 22) ` -* :doc:`Beta 1 (API Version 21) ` -* :doc:`Alpha 6 (API Version 16) ` -* :doc:`Alpha 5 (API Version 14) ` +* :doc:`5.1 (API Version 510) ` +* :doc:`5.0 (API Version 500) ` +* :doc:`4.6 (API Version 460) ` +* :doc:`4.5 (API Version 450) ` +* :doc:`4.4 (API Version 440) ` +* :doc:`4.3 (API Version 430) ` +* :doc:`4.2 (API Version 420) ` +* :doc:`4.1 (API Version 410) ` +* :doc:`4.0 (API Version 400) ` +* :doc:`3.0 (API Version 300) ` +* :doc:`2.0 (API Version 200) ` +* :doc:`1.0 (API Version 100) ` +* :doc:`Beta 3 (API Version 23) ` +* :doc:`Beta 2 (API Version 22) ` +* :doc:`Beta 1 (API Version 21) ` +* :doc:`Alpha 6 (API Version 16) ` +* :doc:`Alpha 5 (API Version 14) ` diff --git a/documentation/sphinx/source/old-release-notes/release-notes-600.rst b/documentation/sphinx/source/release-notes/release-notes-600.rst similarity index 92% rename from documentation/sphinx/source/old-release-notes/release-notes-600.rst rename to documentation/sphinx/source/release-notes/release-notes-600.rst index a934dcae29..f3a921b15b 100644 --- a/documentation/sphinx/source/old-release-notes/release-notes-600.rst +++ b/documentation/sphinx/source/release-notes/release-notes-600.rst @@ -161,21 +161,21 @@ Other Changes Earlier release notes --------------------- -* :doc:`5.2 (API Version 520) ` -* :doc:`5.1 (API Version 510) ` -* :doc:`5.0 (API Version 500) ` -* :doc:`4.6 (API Version 460) ` -* :doc:`4.5 (API Version 450) ` -* :doc:`4.4 (API Version 440) ` -* :doc:`4.3 (API Version 430) ` -* :doc:`4.2 (API Version 420) ` -* :doc:`4.1 (API Version 410) ` -* :doc:`4.0 (API Version 400) ` -* :doc:`3.0 (API Version 300) ` -* :doc:`2.0 (API Version 200) ` -* :doc:`1.0 (API Version 100) ` -* :doc:`Beta 3 (API Version 23) ` -* :doc:`Beta 2 (API Version 22) ` -* :doc:`Beta 1 (API Version 21) ` -* :doc:`Alpha 6 (API Version 16) ` -* :doc:`Alpha 5 (API Version 14) ` +* :doc:`5.2 (API Version 520) ` +* :doc:`5.1 (API Version 510) ` +* :doc:`5.0 (API Version 500) ` +* :doc:`4.6 (API Version 460) ` +* :doc:`4.5 (API Version 450) ` +* :doc:`4.4 (API Version 440) ` +* :doc:`4.3 (API Version 430) ` +* :doc:`4.2 (API Version 420) ` +* :doc:`4.1 (API Version 410) ` +* :doc:`4.0 (API Version 400) ` +* :doc:`3.0 (API Version 300) ` +* :doc:`2.0 (API Version 200) ` +* :doc:`1.0 (API Version 100) ` +* :doc:`Beta 3 (API Version 23) ` +* :doc:`Beta 2 (API Version 22) ` +* :doc:`Beta 1 (API Version 21) ` +* :doc:`Alpha 6 (API Version 16) ` +* :doc:`Alpha 5 (API Version 14) ` diff --git a/documentation/sphinx/source/old-release-notes/release-notes-610.rst b/documentation/sphinx/source/release-notes/release-notes-610.rst similarity index 94% rename from documentation/sphinx/source/old-release-notes/release-notes-610.rst rename to documentation/sphinx/source/release-notes/release-notes-610.rst index 6727195240..75c37aad59 100644 --- a/documentation/sphinx/source/old-release-notes/release-notes-610.rst +++ b/documentation/sphinx/source/release-notes/release-notes-610.rst @@ -180,22 +180,22 @@ Fixes only impacting 6.1.0+ Earlier release notes --------------------- -* :doc:`6.0 (API Version 600) ` -* :doc:`5.2 (API Version 520) ` -* :doc:`5.1 (API Version 510) ` -* :doc:`5.0 (API Version 500) ` -* :doc:`4.6 (API Version 460) ` -* :doc:`4.5 (API Version 450) ` -* :doc:`4.4 (API Version 440) ` -* :doc:`4.3 (API Version 430) ` -* :doc:`4.2 (API Version 420) ` -* :doc:`4.1 (API Version 410) ` -* :doc:`4.0 (API Version 400) ` -* :doc:`3.0 (API Version 300) ` -* :doc:`2.0 (API Version 200) ` -* :doc:`1.0 (API Version 100) ` -* :doc:`Beta 3 (API Version 23) ` -* :doc:`Beta 2 (API Version 22) ` -* :doc:`Beta 1 (API Version 21) ` -* :doc:`Alpha 6 (API Version 16) ` -* :doc:`Alpha 5 (API Version 14) ` +* :doc:`6.0 (API Version 600) ` +* :doc:`5.2 (API Version 520) ` +* :doc:`5.1 (API Version 510) ` +* :doc:`5.0 (API Version 500) ` +* :doc:`4.6 (API Version 460) ` +* :doc:`4.5 (API Version 450) ` +* :doc:`4.4 (API Version 440) ` +* :doc:`4.3 (API Version 430) ` +* :doc:`4.2 (API Version 420) ` +* :doc:`4.1 (API Version 410) ` +* :doc:`4.0 (API Version 400) ` +* :doc:`3.0 (API Version 300) ` +* :doc:`2.0 (API Version 200) ` +* :doc:`1.0 (API Version 100) ` +* :doc:`Beta 3 (API Version 23) ` +* :doc:`Beta 2 (API Version 22) ` +* :doc:`Beta 1 (API Version 21) ` +* :doc:`Alpha 6 (API Version 16) ` +* :doc:`Alpha 5 (API Version 14) ` diff --git a/documentation/sphinx/source/release-notes.rst b/documentation/sphinx/source/release-notes/release-notes-620.rst similarity index 95% rename from documentation/sphinx/source/release-notes.rst rename to documentation/sphinx/source/release-notes/release-notes-620.rst index b05fdfbe6c..51392f07d5 100644 --- a/documentation/sphinx/source/release-notes.rst +++ b/documentation/sphinx/source/release-notes/release-notes-620.rst @@ -1,3 +1,5 @@ +.. _release-notes: + ############# Release Notes ############# @@ -356,23 +358,23 @@ Fixes only impacting 6.2.0+ Earlier release notes --------------------- -* :doc:`6.1 (API Version 610) ` -* :doc:`6.0 (API Version 600) ` -* :doc:`5.2 (API Version 520) ` -* :doc:`5.1 (API Version 510) ` -* :doc:`5.0 (API Version 500) ` -* :doc:`4.6 (API Version 460) ` -* :doc:`4.5 (API Version 450) ` -* :doc:`4.4 (API Version 440) ` -* :doc:`4.3 (API Version 430) ` -* :doc:`4.2 (API Version 420) ` -* :doc:`4.1 (API Version 410) ` -* :doc:`4.0 (API Version 400) ` -* :doc:`3.0 (API Version 300) ` -* :doc:`2.0 (API Version 200) ` -* :doc:`1.0 (API Version 100) ` -* :doc:`Beta 3 (API Version 23) ` -* :doc:`Beta 2 (API Version 22) ` -* :doc:`Beta 1 (API Version 21) ` -* :doc:`Alpha 6 (API Version 16) ` -* :doc:`Alpha 5 (API Version 14) ` +* :doc:`6.1 (API Version 610) ` +* :doc:`6.0 (API Version 600) ` +* :doc:`5.2 (API Version 520) ` +* :doc:`5.1 (API Version 510) ` +* :doc:`5.0 (API Version 500) ` +* :doc:`4.6 (API Version 460) ` +* :doc:`4.5 (API Version 450) ` +* :doc:`4.4 (API Version 440) ` +* :doc:`4.3 (API Version 430) ` +* :doc:`4.2 (API Version 420) ` +* :doc:`4.1 (API Version 410) ` +* :doc:`4.0 (API Version 400) ` +* :doc:`3.0 (API Version 300) ` +* :doc:`2.0 (API Version 200) ` +* :doc:`1.0 (API Version 100) ` +* :doc:`Beta 3 (API Version 23) ` +* :doc:`Beta 2 (API Version 22) ` +* :doc:`Beta 1 (API Version 21) ` +* :doc:`Alpha 6 (API Version 16) ` +* :doc:`Alpha 5 (API Version 14) ` From f2325187b5bab0d2027c3cf1bfa5383ff32a1298 Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Thu, 18 Jun 2020 10:42:58 -0700 Subject: [PATCH 09/10] Fix the link for a release note. --- documentation/sphinx/source/release-notes/release-notes-620.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/sphinx/source/release-notes/release-notes-620.rst b/documentation/sphinx/source/release-notes/release-notes-620.rst index 51392f07d5..a5b449e09c 100644 --- a/documentation/sphinx/source/release-notes/release-notes-620.rst +++ b/documentation/sphinx/source/release-notes/release-notes-620.rst @@ -120,7 +120,7 @@ Performance * Reduced tail commit latencies by improving commit pipelining on the proxies. `(PR #2589) `_. * Data distribution does a better job balancing data when disks are more than 70% full. `(PR #2722) `_. * Reverse range reads could read too much data from disk, resulting in poor performance relative to forward range reads. `(PR #2650) `_. -* Switched from LibreSSL to OpenSSL to improve the speed of establishing connections. `(PR #2650) `_. +* Switched from LibreSSL to OpenSSL to improve the speed of establishing connections. `(PR #2646) `_. * The cluster controller does a better job avoiding multiple recoveries when first recruited. `(PR #2698) `_. Fixes From 42159ccfe04dab94818352c2ea2a526122ba0ab9 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 22 Jun 2020 23:45:03 +0000 Subject: [PATCH 10/10] Add -Wpessimizing-move and -Wredundant-move for clang --- cmake/ConfigureCompiler.cmake | 5 ++++- fdbclient/NativeAPI.actor.cpp | 2 +- flow/actorcompiler/ActorCompiler.cs | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cmake/ConfigureCompiler.cmake b/cmake/ConfigureCompiler.cmake index d2941bc4b4..6f574e4c0d 100644 --- a/cmake/ConfigureCompiler.cmake +++ b/cmake/ConfigureCompiler.cmake @@ -219,7 +219,10 @@ else() -Wno-undefined-var-template -Wno-unused-value -Wno-tautological-pointer-compare - -Wno-format) + -Wno-format + -Wredundant-move + -Wpessimizing-move + ) if (USE_CCACHE) add_compile_options( -Wno-register diff --git a/fdbclient/NativeAPI.actor.cpp b/fdbclient/NativeAPI.actor.cpp index 909d0abeaa..53e903edd1 100644 --- a/fdbclient/NativeAPI.actor.cpp +++ b/fdbclient/NativeAPI.actor.cpp @@ -633,7 +633,7 @@ Reference DatabaseContext::setCachedLocation( const KeyRangeRef& k locationCache.insert( KeyRangeRef(begin, end), Reference() ); } locationCache.insert( keys, loc ); - return std::move(loc); + return loc; } void DatabaseContext::invalidateCache( const KeyRef& key, bool isBackward ) { diff --git a/flow/actorcompiler/ActorCompiler.cs b/flow/actorcompiler/ActorCompiler.cs index 1a31e3b34a..8b3575b62a 100644 --- a/flow/actorcompiler/ActorCompiler.cs +++ b/flow/actorcompiler/ActorCompiler.cs @@ -573,7 +573,7 @@ namespace actorcompiler { LineNumber(cx.target, stmt.FirstSourceLine); if (stmt.decl.initializerConstructorSyntax || stmt.decl.initializer=="") - cx.target.WriteLine("{0} = std::move( {1}({2}) );", stmt.decl.name, stmt.decl.type, stmt.decl.initializer); + cx.target.WriteLine("{0} = {1}({2});", stmt.decl.name, stmt.decl.type, stmt.decl.initializer); else cx.target.WriteLine("{0} = {1};", stmt.decl.name, stmt.decl.initializer); }