Commit Graph

38 Commits

Author SHA1 Message Date
FDB Formatster df90cc89de apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-03-10 10:18:07 -08:00
Richard Chen 41843f07e6 add simulator support for different process versions and ProtocolVersion test 2020-10-12 18:19:31 +00:00
Meng Xu 1b68665228 Merge branch 'master' into release-6.3 2020-07-08 18:52:05 -07:00
sfc-gh-tclinkenbeard 60b893d423 Switch from boost::variant to std::variant 2020-07-04 19:28:05 -07:00
Meng Xu 22f7f804b8 Merge branch 'release-6.3' into mengxu/merge-6.3-PR 2020-06-28 11:19:39 -07:00
sfc-gh-tclinkenbeard 8de70432a6 Fix memory leaks in VectorRef
VectorRef<T> relies on T being trivially destructible, but this was not
yet enforced. By statically asserting that T is trivially destructible,
we avoid leaking memory by not calling the destructor for non-trivially
destructible types
2020-06-24 10:54:19 -07:00
Andrew Noyes 0d52ebb593 Use VecSerStrategy::String 2020-05-02 01:05:58 +00:00
Andrew Noyes f9869966e3 Add VectorRef tests 2020-05-02 00:55:04 +00:00
Andrew Noyes c067a63686 Improve testing 2020-05-02 00:47:18 +00:00
Andrew Noyes 2df0797eec Add unit test 2020-05-01 18:19:17 +00:00
Evan Tschannen 3fb91e8f0c
Merge pull request #3016 from etschannen/master
Merge release 6.2 into master
2020-04-23 15:44:47 -07:00
Andrew Noyes 99f5808118 Remove brittle ASSERT
The vtables are sorted by address, so ASLR makes this test
non-deterministic
2020-04-23 14:08:44 -07:00
Evan Tschannen c87aa33941 Merge branch 'release-6.2'
# Conflicts:
#	CMakeLists.txt
#	bindings/go/src/fdb/generated.go
#	documentation/sphinx/source/api-common.rst.inc
#	documentation/sphinx/source/api-ruby.rst
#	documentation/sphinx/source/release-notes.rst
#	fdbclient/FailureMonitorClient.actor.cpp
#	fdbclient/NativeAPI.actor.cpp
#	fdbclient/vexillographer/fdb.options
#	fdbrpc/FlowTransport.actor.cpp
#	fdbserver/OldTLogServer_6_0.actor.cpp
#	fdbserver/TLogServer.actor.cpp
#	fdbserver/fdbserver.actor.cpp
#	versions.target
2020-04-23 13:47:53 -07:00
Andrew Noyes cb6389d42d Prevent main thread from destroying flatbuffers globals
We recently witnessed (using tsan) the main thread exiting without first
joining the network thread, and this caused data races and
heap-use-after-free's

Now the lifetime of these globals will be tied to the network thread
itself (and I guess every thread, but the one that actually uses memory
will be owned by the network thread.)
2020-04-17 23:34:28 +00:00
Andrew Noyes 770ef6e726 Add test 2020-03-10 10:42:57 -07:00
Andrew Noyes cdbe3117d7 Fix typo 2020-03-02 12:11:43 -08:00
Andrew Noyes 7119b46eb2 Add unit test 2020-03-02 12:11:43 -08:00
Evan Tschannen dc668d1fc9 attempt to fix the serialization of CachedSerialization 2019-09-11 11:45:07 -07:00
Balachandar Namasivayam e8a9931dbe
Merge pull request #1918 from atn34/at-what-cost
Avoid memcpy for small types
2019-07-31 11:39:38 -07:00
Andrew Noyes d0ecdb4fb1 Replace std::map with sorted std::vector 2019-07-30 16:17:14 -07:00
Andrew Noyes 997da6882a Explain test subtlety 2019-07-29 16:00:14 -07:00
Andrew Noyes 9d32cbcf50 Deserialize Arena after VectorRef in flat_buffers unit test 2019-07-29 15:45:54 -07:00
mpilman 1ac2d01b03 Merge remote-tracking branch 'upstream/master' into flatbuffers-fixes2 2019-07-18 09:50:08 -07:00
mpilman b18666d942 statically link libstdc++ on Linux and remove std::variant
this will hopefully fix #1610
2019-07-16 14:53:16 -07:00
mpilman 6c6a1ca8f4 Expose serialization context too all traits 2019-07-15 12:58:31 -07:00
mpilman 1ab36cafbc Fixed memory bug 2019-07-15 09:53:26 -07:00
mpilman cb7b941452 expose protocolVersion to serialize function
The main idea here is that we now have a context for
serialization and deserialization. This can be used
to access the protocolVersion.

The context still needs to be exposed to the
deserailization traits
2019-07-12 17:16:54 -07:00
mpilman 75d4b612cf Make object serializer versioned 2019-07-12 11:53:14 -07:00
Andrew Noyes eb87b1fc61 Remove dead code 2019-07-11 23:03:31 -07:00
Andrew Noyes a34f8d70d6 Re-use writeToOffsets vector 2019-07-11 23:03:31 -07:00
Andrew Noyes e2ed56fa56 Convert ownedPtr to unownedPtr for IReplicationPolicy
Remove WriteRawMemory feature

Remove deserialization_done
2019-07-05 14:07:02 -07:00
Andrew Noyes 9894d928a1 Re-use identical vtables 2019-07-05 14:07:02 -07:00
A.J. Beamon e5381e0612 Fix some new usages of g_random 2019-05-23 09:23:27 -07:00
Alvin Moore 17a2983943 Switch boost variant to C++17 variant 2019-05-16 13:05:49 -07:00
mpilman 186bff4ae5 removed unnecessary assert and added test 2019-05-13 14:15:23 -07:00
mpilman b06fe39b47 renamed flatbuffers tests for consistency 2019-05-13 14:15:22 -07:00
mpilman fe81454ec2 basic functionality for object serializer
This commit includes:
- The flatbuffers implementation
- A draft on how it should be used for network messages
- A serializer that can be used independently

What is missing:
- All root objects will need a file identifier
- Many special classes can not be serialized yet as the
  corresponding traits are not yet implemented
- Object serialization can not yet be turned on (this will
  need a network option)
2019-05-13 14:15:22 -07:00
mpilman 8bbd28315e Added Object serializer (does not yet compile) 2019-05-13 14:15:22 -07:00