Commit Graph

86 Commits

Author SHA1 Message Date
sfc-gh-tclinkenbeard b9a22a61ef Fix many -Wreorder-ctor warnings 2021-07-23 17:33:18 -07:00
Xiaoge Su 5089459bd2 Add static_assert to *Writer::serializeBinaryItem
BinaryWriter::serializeBinaryItem will accept *any* objects and
serialize them by memory copy. If the object is a struct, padding bytes
will also be copied, which is not expected (at this stage, the
serializer will NOT include any padding). If padding exists, the caller
is required to use _Reader::serializeBinaryItem when reading.

Due to this inconsistency, it is helpful to restrict
serializedBinaryItem calls to limited types. Base on the current
implementation, one reasonable approach is allowing only those types
are BINARY_SERIALIZABLE. This patch addresses such restriction.

The restriction is also applied to other classes:

 * OverWriter
 * _Reader
 * PacketWriter
2021-06-23 18:45:51 -07:00
FDB Formatster df90cc89de apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-03-10 10:18:07 -08:00
Andrew Noyes 564c70acb4
Merge branch 'master' into anoyes/modernize-use-override 2021-01-25 18:26:18 -08:00
Andrew Noyes 4ee97c0784 Use clang-tidy to automatically fix missing overrides
Use `clang-tidy -p . $file -checks='-*,modernize-use-override' -header-filter='.*' -fix`
to fix missing overrides, and then use git clang-format to reformat just
those changes. This went pretty well for most files.

Formatting the following files went off the rails, so I'm going to
follow up with a commit that's just clang-tidy and no clang-format.

- fdbclient/DatabaseBackupAgent.actor.cpp
- fdbclient/FileBackupAgent.actor.cpp
- fdbserver/OldTLogServer_4_6.actor.cpp
- fdbmonitor/SimpleIni.h
- fdbserver/workloads/ClientTransactionProfileCorrectness.actor.cpp
2021-01-26 02:04:12 +00:00
sfc-gh-tclinkenbeard b88a47f7db Encapsulation PacketWriter methods 2021-01-22 18:48:23 -08:00
sfc-gh-tclinkenbeard 95eaa5e866 Merge remote-tracking branch 'origin/master' into misc-changes 2021-01-13 21:14:36 -08:00
Markus Pilman 2609c3d619
Merge pull request #4072 from sfc-gh-tclinkenbeard/improve-type-safety
Make enums automatically binary serializable
2021-01-12 10:31:34 -07:00
sfc-gh-tclinkenbeard 21d7620922 TDMetric optimizations 2020-12-26 22:50:34 -04:00
David Youngworth fc9b78737f Fix some merge bugs 2020-11-17 14:53:02 -08:00
David Youngworth d64cf8b9e3 Merge branch 6.3 into master 2020-11-17 11:22:45 -08:00
David Youngworth 489ba20641 Fix several merge issues 2020-11-16 14:46:36 -08:00
David Youngworth d0391db862 Merge branch 'release-6.2' into release-6.3 2020-11-16 10:15:23 -08:00
sfc-gh-tclinkenbeard eab75d4ee1 Make enums automatically binary serializable 2020-11-14 19:22:04 -08:00
Russell Sears 08e8a06933 PR comments; add missing addRef when re-using Histogram in HistogramRegistry; Instrument UnsentPacketQueue in FlowTransport 2020-11-08 08:37:16 -08:00
Russell Sears df18f20efd clang format 2020-11-05 10:27:41 -08:00
Russell Sears 26a66c632a Allow histograms to be fetched by name (so multiple instances can share the same histogram 2020-11-05 10:27:37 -08:00
sfc-gh-tclinkenbeard 0ac08f6a9b Replace NULL with nullptr in flow 2020-09-20 11:31:49 -07:00
Young Liu e87327b33b Merge master branch and keep master proxy reporting txn cost estimation to ratekeeper 2020-08-29 12:47:35 -07:00
Xiaoxi Wang 548ba06510 change map to deque; code style problem 2020-08-14 18:30:58 +00:00
Evan Tschannen a49cb41de7 Merge branch 'release-6.3'
# Conflicts:
#	CMakeLists.txt
#	cmake/ConfigureCompiler.cmake
#	fdbserver/Knobs.cpp
#	fdbserver/StorageCache.actor.cpp
#	fdbserver/storageserver.actor.cpp
#	flow/ThreadHelper.actor.h
#	flow/serialize.h
#	tests/CMakeLists.txt
2020-07-29 00:31:55 -07:00
Meng Xu 2b8aa296bb
Merge pull request #3482 from sfc-gh-tclinkenbeard/support-downgrades
Support and test downgrades
2020-07-28 17:00:54 -07:00
sfc-gh-tclinkenbeard 300f9b1bfa Remove PairFileIdentifier 2020-07-20 18:52:44 -07:00
sfc-gh-tclinkenbeard abaae40453 Modified ComposedIdentifier to prevent file identifier conflicts at
compile-time
2020-07-20 18:52:44 -07:00
sfc-gh-tclinkenbeard cf4f753836 Test ArenaReader in Downgrade workload 2020-07-09 16:26:27 -07:00
sfc-gh-tclinkenbeard e69f299a5c Added minInvalidProtocolVersion 2020-07-09 14:39:35 -07:00
sfc-gh-tclinkenbeard 373b5ffb4f Added forward compatibility and Downgrade workload 2020-07-09 14:28:35 -07:00
sfc-gh-tclinkenbeard d3d7ad6de5 Simplify _Reader constructors 2020-07-09 14:28:34 -07:00
sfc-gh-tclinkenbeard 080a67d76f Added BinaryReader::objectReader field 2020-07-09 14:28:34 -07:00
sfc-gh-tclinkenbeard 67f17ccf5c Remove duplicate BinaryReader code 2020-07-06 23:14:34 -07:00
sfc-gh-tclinkenbeard 37ffa8f443 Addressed review comment 2020-07-02 13:13:30 -07:00
Steve Atherton 0da4c91ad5 Performance improvements in socket use and buffering which results in TLS network connections using around 3.5x less CPU.
PacketBuffers are 16k minimum sizes, using FastAlloc.  All calling paths to PacketBuffer creation now pass a size hint if known.  P2PNetworkTest improved in many ways, errors go to TraceEvents instead of stdout, error counts are reported in stats, range min/max parameters are combined into "min:max" strings, new options to "stutter" connections by delaying randomly before socket read or write, message size to send is now configured separately for incoming vs outgoing sessions.
2020-06-25 20:44:43 -07:00
sfc-gh-tclinkenbeard d7cb54d2b2 Fixed Windows CMake build 2020-06-20 23:03:18 -07:00
sfc-gh-tclinkenbeard a59925dd73 Added more const-correctness improvements 2020-06-20 22:15:19 -07:00
Andrew Noyes 027029cc9b Remove offending overload? 2020-03-10 10:18:14 -07:00
Evan Tschannen 96258b9809 Merge branch 'release-6.2'
# Conflicts:
#	documentation/sphinx/source/release-notes.rst
#	fdbcli/fdbcli.actor.cpp
#	fdbclient/ManagementAPI.actor.cpp
#	fdbrpc/FlowTransport.actor.cpp
#	fdbserver/ClusterController.actor.cpp
#	fdbserver/DataDistribution.actor.cpp
#	fdbserver/DataDistribution.actor.h
#	fdbserver/DataDistributionQueue.actor.cpp
#	fdbserver/KeyValueStoreMemory.actor.cpp
#	fdbserver/MasterProxyServer.actor.cpp
#	fdbserver/QuietDatabase.actor.cpp
#	fdbserver/SkipList.cpp
#	fdbserver/StorageMetrics.actor.h
#	fdbserver/TLogServer.actor.cpp
#	fdbserver/fdbserver.actor.cpp
#	fdbserver/storageserver.actor.cpp
#	fdbserver/workloads/KVStoreTest.actor.cpp
#	flow/CMakeLists.txt
#	flow/Knobs.cpp
#	flow/Knobs.h
#	flow/genericactors.actor.cpp
#	flow/serialize.h
2020-02-21 19:09:16 -08:00
Evan Tschannen 9b3254d5f4 A corrupted processId file should be deleted in simulation, as that is the manual operation that would fix the problem in the real world 2020-02-19 15:21:42 -08:00
mpilman aac94a766b Removed dead code 2020-02-15 21:56:48 -08:00
Andrew Noyes 1248d2b8b4 Remove USE_OBJECT_SERIALIZER knob 2020-02-12 10:41:52 -08:00
mpilman d09e07f1f5 Merge remote-tracking branch 'upstream/master' into features/icc 2020-02-04 10:26:18 -08:00
Andrew Noyes 46d10dc7dc Fix "null passed as argument declared not null"
Fix several such reports from ubsan

E.g.

/Users/anoyes/workspace/foundationdb/flow/Arena.h:794:16: runtime error: null pointer passed as argument 1, which is declared to never be null
2019-12-03 14:46:53 -08:00
mpilman 75d4b612cf Make object serializer versioned 2019-07-12 11:53:14 -07:00
Andrew Noyes 137936762d Eliminate unnecessary memcpy 2019-07-11 23:03:31 -07:00
Andrew Noyes 70f0726185 Support PacketBuffer's of arbitrary size 2019-07-11 23:03:31 -07:00
Andrew Noyes 6d74af93d3 Use true instead of 1 2019-07-05 14:07:02 -07:00
Andrew Noyes 4c5ebd7609 Avoid assert when collecting vtables 2019-07-05 14:07:02 -07:00
mpilman 844dd60202 FDB compiling with intel compiler 2019-06-20 09:29:01 -07:00
mpilman 68ce9a5e75 ProtocolVersion type - second try 2019-06-18 17:55:27 -07:00
mpilman 8576665a90 Revert "Revert "Make protocol version a type""
This reverts commit 455bf3b3ec.
2019-06-18 14:49:04 -07:00
Alex Miller 455bf3b3ec Revert "Make protocol version a type" 2019-06-18 10:59:17 -07:00