Commit Graph

304 Commits

Author SHA1 Message Date
Chris Vest
956724fbc1 Remove test that no longer makes sense because it relied on being able to change buffer byte order 2021-09-01 11:20:24 +02:00
Chris Vest
6413143811 Update with recent Netty 5 changes 2021-09-01 11:16:41 +02:00
Chris Vest
c6e4fd98c8
Merge pull request #73 from kashike/feature/exceptions
Move to custom exception types
2021-06-01 12:33:57 +02:00
Chris Vest
d0d929bc55 Align the remaining exception expectations and fix MemSegBuffer and CompositeBuffer to throw the correct exceptions 2021-06-01 12:04:57 +02:00
Chris Vest
289c9ebba1 Make Buffer.ensureWritable throw exceptions consistent with the rest of the API 2021-06-01 11:35:01 +02:00
Chris Vest
eaee4350b7 Make MemSegBuffer.compact throw correct exception when read-only 2021-06-01 11:20:58 +02:00
Chris Vest
7f74dbc7aa Fix exceptions in ByteBufAdaptor 2021-06-01 10:34:41 +02:00
Chris Vest
60df2393f3 Get the tests passing again 2021-06-01 10:28:42 +02:00
Riley Park
c840a41e31
Move to custom exception types 2021-05-31 11:50:44 -07:00
Chris Vest
f0a57ed023
Merge pull request #72 from netty/integration
Implement BufferIntegratable for Nio- and UnsafeBuffer
2021-05-31 15:18:39 +02:00
Chris Vest
a48a12794d Make release(int) methods handle errors better
Exception types and error messages are now unified and more descriptive.
2021-05-31 15:06:48 +02:00
Chris Vest
1471b4a758
Merge pull request #75 from netty/ci-fixes
Make it possible for 3rd party PRs to get test results uploaded
2021-05-28 18:35:36 +02:00
Chris Vest
2ae7a88067 Cleanups and re-trigger GHA workflow 2021-05-28 18:23:10 +02:00
Chris Vest
9724ab23fb Make it possible for 3rd party PRs to get test results uploaded 2021-05-28 17:54:35 +02:00
Chris Vest
db7ac99699 Fix more review comments 2021-05-28 17:10:46 +02:00
Chris Vest
f3c86e3fbc
Merge pull request #71 from kashike/fix/typos-1
chore: fix a few typos
2021-05-28 16:29:38 +02:00
Chris Vest
a6b4aeaaba
Merge pull request #74 from kashike/feature/noop
feat: Re-use a NOOP tracer
2021-05-28 16:28:16 +02:00
Chris Vest
53a8d71c64 Fix numerous review comments
- Mostly javadocs have been fixed or added.
- A couple of small code changes in ByteBufAdaptor to better cope with unlikely exceptions.
2021-05-28 16:23:35 +02:00
Riley Park
e1a983fcb6
chore: fix a few typos 2021-05-28 06:58:22 -07:00
Riley Park
f400b1ff15
feat: Re-use a NOOP tracer 2021-05-28 06:56:42 -07:00
Chris Vest
78b30a1b37 Convert ByteBufAdaptorTests to JUnit 5, and fix the MemSeg test skipping for Java 11 2021-05-28 15:13:47 +02:00
Chris Vest
ecbd2476e1 Use correct assume function for JUnit4 tests 2021-05-28 14:08:55 +02:00
Chris Vest
af119de4a7 Implement BufferIntegratable for Nio- and UnsafeBuffer 2021-05-28 14:08:55 +02:00
Chris Vest
d7d0c0fa93
Merge pull request #70 from netty/rm-slice-acquire
Remove the concept of reference counting
2021-05-28 14:08:31 +02:00
Chris Vest
d4a54d3828 Fix typo 2021-05-28 13:55:58 +02:00
Chris Vest
0aa2853cf3 Fix a bug in MemSegBuffer 2021-05-28 13:55:55 +02:00
Chris Vest
a6b81c89ef Fix test failures in ByteToMessageDecoderTest 2021-05-28 12:23:16 +02:00
Chris Vest
b2bf0029be Fix adaptor tests 2021-05-28 10:58:37 +02:00
Chris Vest
050db15e07 Fix bug where copy with over-sized length threw a wrong exception 2021-05-27 17:41:40 +02:00
Chris Vest
b1b2c983f8 Do less aggressive test sampling when running tests locally
Instead of filtering out 95% of test samples, now only filter out 85%.
2021-05-27 17:38:38 +02:00
Chris Vest
05d76c27c1 Hide isOwned, countBorrows, and acquire from the public API, even on CompositeBuffer 2021-05-27 17:34:40 +02:00
Chris Vest
1c25fa88b7 Fix test failures coming from removal of slice and introduction of copy. 2021-05-27 17:06:30 +02:00
Chris Vest
707e5e2afb Remove the slice methods, add copy methods 2021-05-27 14:07:31 +02:00
Chris Vest
bfa8fd0b1f Make tests pass after removing acquire from the public API 2021-05-27 11:39:57 +02:00
Chris Vest
b8cfd0768e Fixes for compilation and running tests with UnsafeBuffer implementation 2021-05-26 18:31:28 +02:00
Chris Vest
f0ee2e1467 Remove acquire from the public API
This is a step toward effectively eliminating reference counting.
Reference counting is only needed when the memory in buffers can be shared.
If we remove all forms of sharing, then the buffers would be in an owned state at all times.
Then we would no longer need to worry about the state of the buffers before calling, e.g. `ensureWritable` and methods like that.

Just removing `acquire` is not enough; we also need to remove the `slice` method.
In this commit we are, however, starting with `acquire` because doing so requires rearranging the type hierarchy and the generics we have in play.
This was not an easy exercise, but for the purpose of record keeping, it's useful to have that work separate from the work of removing `slice`.
2021-05-26 17:19:26 +02:00
Chris Vest
aaf8e294cc
Merge pull request #68 from netty/modules
Split the repo into multiple modules and make building with Java 11 possible
2021-05-22 09:32:46 +02:00
Chris Vest
b710546dd5 Short readme update on Java 11 support 2021-05-21 22:09:37 +02:00
Chris Vest
0267afc0cd Remove redundant step 2021-05-21 22:03:03 +02:00
Chris Vest
408350622d Debug issue with the maven cache 2021-05-21 21:53:57 +02:00
Chris Vest
acf9f8b4fb Publish test reports for the Java 11 build 2021-05-21 19:17:42 +02:00
Chris Vest
a1f943c8ae Cache the Maven repository for the Java 11 build 2021-05-21 19:15:31 +02:00
Chris Vest
a9b8189aa1 Add a Java 11 build 2021-05-21 18:38:34 +02:00
Chris Vest
9dc1d533e3 Fix remaining tests and make the build work on Java 11 2021-05-21 17:28:07 +02:00
Chris Vest
1c3b27f9e0 Further reduce memory overhead of PooledBufferAllocator
… by lazily allocating PoolSubpages inside of the PoolArenas.
By default, a pooled allocator creates 32 arenas, and each arena, by default, makes room for 39 PoolSubpage size classes, which all told is 1.248 objects that serve no purpose other than as headers and locks for linked lists.
Each of these objects is at least 81 bytes, plus whatever the JVM adds on top.
This might not sound like much, but in our testing we'll be creating many thousands of allocators, and then it really adds up.
2021-05-21 15:37:59 +02:00
Chris Vest
e6f867cc5f Remove some deprecated methods 2021-05-21 15:03:48 +02:00
Chris Vest
7e379fd6ad Make sure to copy test reports out of the finished build container 2021-05-21 14:34:33 +02:00
Chris Vest
1143223407 First draft of splitting the repo into multiple modules and allowing builds with Java 11 2021-05-21 14:04:23 +02:00
Chris Vest
99cddf7749
Merge pull request #67 from netty/pooling-allocator
Port over the pooling buffer allocator from Netty
2021-05-18 22:38:32 +02:00
Chris Vest
0105e5231d Remove the SizeClassedMemoryPool implementation
And fix the remaining test failures for the PooledBufferAllocator.
The PooledBufferAllocator now also keeps its chunks alive, even after closing the pool, as long as there are allocated buffers that refer to the memory.
The pool now clears all of its relevant internal references when closed, allowing the GC to reclaim all of the pooled memory, assuming no allocated buffers remain.
2021-05-18 18:20:32 +02:00