183 Commits

Author SHA1 Message Date
Steve Atherton
2c9b2dd005 Merge commit '1b919f52e928e8a72d5acba9175eae32ed4b0c90' into redwood-rare-bugs
# Conflicts:
#	flow/ThreadHelper.actor.h
2022-03-30 18:21:03 -07:00
Andrew Noyes
1b919f52e9
Combine vector_like_traits::{insert,reserve} (#6689)
* Combine vector_like_traits::{insert,reserve}

and explain semantics better. This should make it more clear what
implementers need to do when implementing the vector_like_traits
concept.

* Update std::unordered_set vector_like_traits impl
2022-03-30 16:29:35 -07:00
Steve Atherton
9f205217a4 Merge branch 'main' of https://github.com/apple/foundationdb into redwood-rare-bugs-6574 2022-03-21 21:57:57 -07:00
sfc-gh-tclinkenbeard
a71099471b Update copyright header dates 2022-03-21 13:36:23 -07:00
sfc-gh-tclinkenbeard
0ae9ba5fd0 Add FastInaccurateEstimate boolean parameter for Arena::getSize 2022-03-16 16:54:27 -07:00
Steve Atherton
59762fc784
Merge pull request #6423 from sfc-gh-satherton/redwood-bug-fixes-and-memory-leak
Redwood memory usage and small memory leak fixes
2022-03-15 16:52:28 -07:00
Steve Atherton
8128f9f0b5 Merge branch 'main' of https://github.com/apple/foundationdb into redwood-rare-bugs 2022-03-10 11:28:09 -08:00
Tao Lin
e2c7c30faf
GetMappedRange support serializable & check RYW & continuation (#6181) 2022-03-10 10:05:44 -08:00
Steve Atherton
9f690d5bd5 Added StringRef::same() which checks data pointers and lengths for match. Fixed a false negative (but not a bug) in boundariesNormal() and used same() to avoid string comparisons. 2022-03-07 22:44:24 -08:00
Steve Atherton
f995b4a502 Merge branch 'main' of https://github.com/apple/foundationdb into redwood-bug-fixes-and-memory-leak 2022-02-18 18:44:28 -08:00
Steve Atherton
735c5697d0 Added fast size estimates to Arena which are O(1) and are usually accurate. When inaccurate, a full size scan will update all estimates in the tree. 2022-02-18 03:25:28 -08:00
sfc-gh-tclinkenbeard
ca7fb0b171 Fix stringop-overflow warning from gcc in StringRef::compare 2022-02-04 14:58:03 -08:00
Trevor Clinkenbeard
e6b02532a6
Merge pull request #6192 from sfc-gh-tclinkenbeard/improve-commitbatcher-performance
Make `VectorRefPreserializer` move constructor noexcept
2022-01-31 09:52:51 -08:00
A.J. Beamon
0dabd85e3b Add a hash function for Optional. Add a default boost hash function for any type that is not boost hashable but can be hashed using std::hash. 2022-01-28 15:56:58 -08:00
sfc-gh-tclinkenbeard
648609d764 Make VectorRefPreserializer move constructor noexcept 2021-12-30 22:46:16 -08:00
Ata E Husain Bohra
0962fcb243 Override commit/grv proxies_count if mutation supplied new value is -1
Patch improves on handling scenarios where either commit or grv proxies
value is update to -1 OR `proxies_count` is being reset.
The code splits the proxies between two proxies by ensuring for invalid
input configuration, the min (read as 1) proxies gets provisioned, otherwise,
the split is done based on input values

Patch handles the scenario where mutation supplied values to update grv_proxies
and/or commit_proxies is -1, however, the total proxy count > 1,
uses DEFAULT_COMMIT_GRV_PROXIES_RATIO to split proxies between
grv_proxies & commit_proxies.
2021-11-24 12:52:31 -08:00
Vaidas Gasiunas
37bc41abbb Merge remote-tracking branch 'apple/master' into multi-version-client-2 2021-10-26 18:51:43 +02:00
Evan Tschannen
3f7df58a77 fixed a number of issues 2021-10-19 13:56:52 -07:00
Vaidas Gasiunas
39017c3b41 MVC2.0: Use page-aligned buffers and offsets, enable async IO for reading & writing client lib files 2021-10-06 18:01:46 +02:00
sfc-gh-tclinkenbeard
7d1af92239 Merge remote-tracking branch 'origin/master' into async-task-thread 2021-07-25 10:30:25 -07:00
Markus Pilman
8f6b048e22 fix macOS build 2021-07-20 11:52:57 -06:00
Andrew Noyes
ebc3368936 Don't include null terminator 2021-07-19 14:54:29 -07:00
Andrew Noyes
459e35f261 Static assert that LiteralStringRef arg is literal string 2021-07-19 14:10:37 -07:00
sfc-gh-tclinkenbeard
87f46fa0af Use std::unique_ptr for AsyncTaskThread::queue elements 2021-07-17 17:00:36 -07:00
sfc-gh-tclinkenbeard
2276397159 Add perfect forwarding to Optional::map and Optional::orDefault 2021-07-12 02:33:51 -07:00
Jingyu Zhou
801258e916
Merge pull request #3404 from sfc-gh-tclinkenbeard/add-vectorref-clear
Added VectorRef::clear
2021-06-07 13:44:08 -07:00
Andrew Noyes
c88750a5a9 Avoid passing null as second arg to memcmp 2021-06-04 09:53:23 -07:00
sfc-gh-tclinkenbeard
03ce46bb5d Merge remote-tracking branch 'origin/master' into add-vectorref-clear 2021-05-25 21:41:22 -07:00
Steve Atherton
60504e12ac Address review comments. 2021-05-17 18:02:09 -07:00
Steve Atherton
a31e4f622f Changed ArenaBlockRef to use 32 bit aligned4kBuffer size. 2021-05-16 03:58:05 -07:00
Steve Atherton
2298567c2b Use of aligned_alloc() for 4k pages causes too much wasted virtual memory. Added new 4k-aligned fast allocator, and changed Arena::allocatedAlignedBuffer() to be 4k-specific, now called Arena::allocate4kAlignedBuffer(). 2021-05-14 23:12:00 -07:00
Steve Atherton
f8a8bf315b Added Arena::allocateAlignedBuffer() to get an aligned memory block owned by an Arena, and ArenaPage uses this. 2021-05-05 15:00:12 -07:00
Josh Slocum
4b5bca6761 Minor Redwood comparison optimizations 2021-04-23 18:49:43 +00:00
FDB Formatster
df90cc89de apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-03-10 10:18:07 -08:00
A.J. Beamon
aaf0a9aa7b Merge branch 'release-6.3' into merge-release-6.3-into-master
# Conflicts:
#	build/docker-compose.yaml
#	cmake/ConfigureCompiler.cmake
#	fdbclient/FileBackupAgent.actor.cpp
#	fdbrpc/AsyncFileCached.actor.h
#	fdbrpc/IAsyncFile.h
#	fdbrpc/IRateControl.h
#	fdbrpc/simulator.h
#	fdbserver/KeyValueStoreSQLite.actor.cpp
#	fdbserver/storageserver.actor.cpp
#	fdbservice/ServiceBase.cpp
2021-02-08 12:58:34 -08:00
A.J. Beamon
449e4b98b4 Attempt to fix a build warning that's now blocking the compile due to werror. 2021-02-08 12:06:51 -08:00
sfc-gh-tclinkenbeard
8191a38b88 Support rvalue reference overload for Optional::get 2020-10-24 21:05:42 -07:00
Young Liu
8cc3e4d3c6 Merge release-6.3 into master 2020-10-19 22:51:56 -07:00
Evan Tschannen
f03a355c4e Merge branch 'release-6.2' into release-6.3
# Conflicts:
#	CMakeLists.txt
#	documentation/sphinx/source/downloads.rst
#	fdbrpc/FlowTransport.actor.cpp
#	fdbrpc/FlowTransport.h
#	flow/Arena.h
#	flow/Knobs.cpp
#	flow/Knobs.h
#	packaging/msi/FDBInstaller.wxs
2020-10-07 12:28:22 -07:00
A.J. Beamon
76da0a7cbc Backport #3426 to release-6.2 2020-10-05 13:53:51 -07:00
Evan Tschannen
12edadd059 Merge branch 'release-6.3'
# Conflicts:
#	CMakeLists.txt
#	fdbclient/Knobs.cpp
#	fdbclient/MasterProxyInterface.h
#	fdbrpc/simulator.h
#	fdbserver/MasterProxyServer.actor.cpp
#	tests/fast/CycleAndLock.txt
#	tests/fast/TxnStateStoreCycleTest.txt
#	tests/fast/VersionStamp.txt
#	tests/slow/ParallelRestoreOldBackupApiCorrectnessAtomicRestore.txt
#	tests/slow/ParallelRestoreOldBackupCorrectnessCycle.txt
#	versions.target
2020-08-31 19:33:34 -07:00
Evan Tschannen
e7a1892947 fixed a compiler warning 2020-08-31 15:01:19 -07:00
sfc-gh-tclinkenbeard
7b210aee24 Use =delete to disable special member functions
This has the benefits of:
- Easier to understand compiler error messages
- Moves some errors from link-time to compile-time
- NonCopyable classes can still specify default move constructors
2020-08-18 11:07:00 -07:00
Evan Tschannen
05306e9c12
Merge pull request #3581 from sfc-gh-anoyes/anoyes/remove-bogus-operator
I don't think 1 - <iter> makes sense, so let's remove this
2020-08-05 10:35:20 -07:00
Andrew Noyes
9ec91cd660 I don't think 1 - <iter> makes sense, so let's remove this 2020-07-30 20:02:44 +00:00
Trevor Clinkenbeard
602b0f9dea
Merge branch 'master' into vectorref-emplace-back 2020-07-28 17:17:11 -07:00
Andrew Noyes
4c17019f37 Fix memory error in SmallVectorRef 2020-07-27 21:11:50 +00:00
Andrew Noyes
75ecc3e2f4 Add difference between two iterators operator 2020-07-22 19:57:47 +00:00
Andrew Noyes
4195d3ab3b Fix compilation, test copies 2020-07-22 19:57:47 +00:00
Andrew Noyes
a25689e6e5 Add append tests, fix append 2020-07-22 19:57:47 +00:00