rippled resets save state after a failed ledger write and trims Batch preflight allocations
Two changes merged into the rippled repository on 11 and 12 November touch different corners of the XRP Ledger server: what happens when a validated ledger cannot be written to the local database, and how much memory the server spends checking Batch transactions.
The first, pull request 8662, merged on 12 November, deals with a failed save. When the relational database reports an error while saveValidatedLedger writes a ledger, the function had already set two marks for that sequence: an entry in the list of pending saves and a SAVED flag on the ledger hash. Those marks stayed behind after the error. With the fix, the function releases both before the error reaches its caller. The next attempt to save that ledger is treated as a first attempt, and any synchronous caller waiting on the sequence is woken up. To support this, HashRouter gains a clearFlags method that clears the named flags on a hash that already has an entry and reports whether any were set, without creating or refreshing entries.
The authors describe the condition as local. The write fails only when the SQLite database, its disk or its schema fails, and the ledger in question is one this server validated itself; no input from peers reaches this code path. The function still reports the failure. What changes is the state it leaves for the next save, which matters for a ledger cleaner change stacked on top of this pull request, the one caller that carries on after such a failure. New unit tests cover clearing only the named flags and clearing a hash with no entry.
The second, pull request 8627, merged on 11 November, is a performance change in Batch::preflight. The duplicate-transaction and duplicate sequence or ticket checks used standard unordered sets and a map of sets, which allocate per node to hold at most eight entries. They are now flat sets backed by a small vector sized to the maximum batch count, so they never leave inline storage. The map of sets is flattened into a set of account and sequence-or-ticket pairs, which is possible because earlier checks guarantee exactly one of Sequence and TicketSequence is set. The pull request states that every result code is unchanged and no amendment is needed. Preflight runs for every submitted and relayed Batch, including those that will be rejected.

Why it matters
Neither change alters consensus or transaction results. The first makes a rare storage failure recoverable without a restart; the second removes allocations from a check that every relayed Batch pays for, including spam. Both are the kind of hardening that shows up only when a node is under stress.