Bt v1.10 Release Notes
-
Date: 12/05/2021
๐ New Features:
- API to create torrent metainfo (.torrent files)
- โก๏ธ Update Guice to 5.0.1 for Java 9 support
- ๐ Support callback functions for when
- Torrent files complete downloading
- The entire torrent completes downloading
- ChooseFilesStage now allows SKIPPED, NORMAL_PRIORITY, and HIGH_PRIORITY for downloading
- File download priority can be mutated while the torrent is downloaded. Skipping or unskipping files while the torrent is downloading is not supported.
- โ Add config switch to completely disable MSE negotiation
- โ Add config parameter for the time interval between reads in MSE negotiation
- โ Add config parameter for the max number of simultaneously assigned pieces for a single peer
- โ Add config parameter for the IP address to send to the tracker (for remote peers to use). Useful when behind a NAT. Only supported for http trackers currently.
- โ Add runtime builder methods for disabling PEX and LSD extensions
๐ Bug Fixes/Improvements:
- ๐ Allow announce key to be missing in the torrent dictionary #42
- ๐ bt.data.digest.JavaSecurityDigester performance improvement #133
- ๐ Fix NullPointerException in SocketChannelHandler.flush()
- ๐ป Do not throw "Unexpectedly interrupted" exception when message loop is shutdown
- ๐ Fix missing breaks in MetadataFetchStage which could led to hang-ups
- Indicate the listening TCP port in thread names
- ๐ Fix ConcurrentModificationException in LocalServiceDiscoveryService
- ๐ Fix memory leak in BtRuntime by making sure that shutdown hook is removed after shutdown is complete
- ๐ Fix memory leak in event bus mechanism by making sure that torrent listeners are removed when torrent is stopped
- Ensure that torrent descriptor is inactivated when BtClient.stop() is invoked
- Multiple minor improvements to reduce memory allocations
- More descriptive error message when there's insufficient room in buffer to read an integer
- ๐ Implement LRU cache for open file handles (fixes issues with torrents with many files)
- ๐ Fix NullPointerException in AdhocTorrentRegistry.unregister(TorrentId)
- โก๏ธ Updated the file I/O APIs to use FileChannel read/write so that multiple threads can concurrently read/write to different sections of an open file
- โ Add API to forcefully flush torrent data to persistent storage
- ๐ BTInteger uses Integer, Long, or BigInteger depending upon the number for space/performance savings
- ๐ Download stage now uses a latch, rather than sleeping, to determine when the download is finished to go onto the seeding stage
- โก๏ธ Eliminate a 1 second wait for the initial torrent download by updating interested peers immediately if there are currently zero peers that the client is interested in
- Torrent chunk verification now uses Stream APIs with a custom ForkJoinPool (if a desired amount of parallelism is requested) rather than an executor
- 0๏ธโฃ DefaultDataDescriptor.filesForPieces now uses a List for indices rather than a map
- LocalBitfield now uses a Copy On Write (COW) strategy for skipped pieces rathen than locking
- PeerBitfields are read with BitSet.valueOf() rather than setting each Bit individually
- Irrelevant pieces are filtered out of a bitset before they reach the piece selectors
- The rarest piece selector now uses bucket sort based on max peer count rather than a MinHeap
- The randomized rarest piece selector uses a precomputed random shuffle order to reduce the overhead of random piece shuffling
- ๐ Fix double release issue in DefaultBorrowedBuffer, which eliminates the harmless exception "Buffer is locked and can't be released" that occured sometimes
- ๐ Fix intermittent NullPointerException in DHT shutdown hook
- ๐ฒ Lower logging level to debug on peer disconnects
- ๐ Eliminate possibility of a dead lock in peer connection handling code #170
- ๐ New configuration option for adjusting the amount of memory used for hashing (verification) of data
- ๐ Fix a dead-lock in SocketChannelHandler #183
- โ Runtime does not terminate when torrent has been downloaded #167
- Peers received from the initial tracker connection are now used rather than discarded
- Bt no longer makes two calls to the tracker on startup - one to announce the startup and the other to get peers.
- Bt now respects tracker minimum announce intervals
- Bt now does not send a completed event to the tracker if the torrent was already completed before it connected to the tracker
- ๐ The first tracker announce is synchronously waited for - this decreases the time to connect to the first peers returned from the tracker.
- ๐ Fix bug that prevents plain text clients from connecting when MSE encryption is enabled