Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
22d799d
v0.4.7.1
go-while Sep 6, 2025
3b4b748
add arg in fetcher: -max-queue
go-while Sep 6, 2025
bd278d0
add webserver flag -compare-active and move funcs
go-while Sep 6, 2025
275983c
maxQueue oscillate 20%-80%
go-while Sep 6, 2025
52dedd2
fallback to start on err
go-while Sep 6, 2025
9aad961
only update progressDB if gotQueued > 0
go-while Sep 6, 2025
c180911
debug print gotQueued
go-while Sep 6, 2025
3e2df97
debug print groupCnt
go-while Sep 6, 2025
b38d824
limit xhdrstreamed to 1000
go-while Sep 6, 2025
5308c4d
groupDBs.Return
go-while Sep 6, 2025
28fccc4
Update README.md
go-while Sep 6, 2025
110dbc9
update dev rsync
go-while Sep 6, 2025
8debe73
Update .gitignore
go-while Sep 6, 2025
bd29e85
add cmd/nntp-transfer
go-while Sep 7, 2025
489cb38
streamed takethis
go-while Sep 7, 2025
d6a05a5
Update createChecksums.sh
go-while Sep 7, 2025
1b07652
Update build_ALL.sh
go-while Sep 7, 2025
0edbc3d
whitespaces
go-while Sep 7, 2025
9eb1ea8
use bufio
go-while Sep 7, 2025
9c9bc1a
debug prints
go-while Sep 7, 2025
5d48d62
takeThisResponseCode
go-while Sep 7, 2025
0b9cfb0
checkResponses
go-while Sep 7, 2025
ebe43cb
-help
go-while Sep 7, 2025
682b957
Update getUpdate.sh.template
go-while Sep 7, 2025
166eaa8
retry
go-while Sep 7, 2025
5e480c5
negative worker
go-while Sep 7, 2025
e3525ea
xhdr *nntp.HeaderLine
go-while Sep 7, 2025
8ab5302
Update README.md
go-while Sep 7, 2025
bc08e4c
remove unused vars
go-while Sep 7, 2025
d7772f5
reuse same error
go-while Sep 7, 2025
386e092
shutdownChan to xhdrstreamed
go-while Sep 7, 2025
8f6cbd6
preAllocThreadRoots
go-while Sep 7, 2025
a783c59
cleanup unused code
go-while Sep 7, 2025
af5cbfe
1 alloc less
go-while Sep 7, 2025
e819c50
fix nil pointer
go-while Sep 7, 2025
e32e0ac
shutdownChan
go-while Sep 7, 2025
52551ed
shutdownChan
go-while Sep 8, 2025
b4a5f93
shutdownChan
go-while Sep 8, 2025
e8f8e20
close conn
go-while Sep 8, 2025
856038b
denoise debugs
go-while Sep 8, 2025
b0a4730
flags
go-while Sep 10, 2025
91d0e39
Update base.html
go-while Sep 10, 2025
f1764d8
remove unused var
go-while Sep 10, 2025
5cb3d2f
Add posting_enabled field to providers table
go-while Sep 10, 2025
af95f30
prepares for posting
go-while Sep 10, 2025
4aa794d
add provider posting options to webadmin
go-while Sep 10, 2025
8459b89
Update admin_providers.html
go-while Sep 10, 2025
0fc4389
ErrIsEmptyGroup
go-while Sep 10, 2025
b6958ad
Update main.go
go-while Sep 11, 2025
4710bee
GroupInfo: FetchStart, FetchEnd
go-while Sep 11, 2025
0fbc5be
use task.Newsgroup ptr
go-while Sep 11, 2025
fded632
taskNewsgroup ptr
go-while Sep 11, 2025
eb377bd
recover-db rebuildThreads
go-while Sep 11, 2025
b7b7288
Update README.md
go-while Sep 11, 2025
c526626
patch rebuildThreads
go-while Sep 11, 2025
151eadb
patch rebuildThreads
go-while Sep 11, 2025
731342e
patch rebuildThreads
go-while Sep 11, 2025
6fe090e
go fmt
go-while Sep 11, 2025
022b5c1
patch rebuildThreads
go-while Sep 11, 2025
befa1fd
Update build_recover-db.sh
go-while Sep 11, 2025
ca65b4f
no caches
go-while Sep 11, 2025
93bd21c
Update db_batch.go
go-while Sep 11, 2025
886b5df
fix routes conflict with news hierarchy
go-while Sep 11, 2025
ca86079
typo
go-while Sep 11, 2025
38c1acc
fix routes conflict
go-while Sep 11, 2025
ad81c26
create irc page
go-while Sep 11, 2025
b448e62
block bot debug
go-while Sep 11, 2025
19adcc5
add socks4/5 proxy support to providers
go-while Sep 12, 2025
c2049f4
move add provider to bottom
go-while Sep 12, 2025
728d0c2
Update admin_providers.html
go-while Sep 12, 2025
903c14b
rename FETCH_MODE to NO_CACHE_BOOT
go-while Sep 12, 2025
0e95628
remove unused code
go-while Sep 12, 2025
4b54f38
Update internal/database/migrations/0012_main_add_proxy_support.sql
go-while Sep 12, 2025
8ad0e94
missing continue
go-while Sep 12, 2025
088bf3e
Merge branch 'testing-001' of ssh://github.com/go-while/go-pugleaf in…
go-while Sep 12, 2025
1ad95c5
Update internal/nntp/nntp-client-commands.go
go-while Sep 12, 2025
3255523
Merge branch 'testing-001' of ssh://github.com/go-while/go-pugleaf in…
go-while Sep 12, 2025
a769d94
Update proxy.go
go-while Sep 12, 2025
74c65d9
Update main.go
go-while Sep 12, 2025
2cdba26
prepares posting via web
go-while Sep 13, 2025
f82b07d
reply to with quote
go-while Sep 13, 2025
c472de2
add page via GET
go-while Sep 13, 2025
9fbfe37
Update sitepost.html
go-while Sep 13, 2025
f1e5643
construct FromHeader: DisplayName@LocalNNTPHostname
go-while Sep 13, 2025
000122d
fix path construction
go-while Sep 13, 2025
a628a62
typo
go-while Sep 13, 2025
03defcb
add MaxCrossPosts
go-while Sep 13, 2025
84ee5f1
Update sitepost.html
go-while Sep 13, 2025
a0fb62a
Update thread.html
go-while Sep 13, 2025
24774e9
Update article.html
go-while Sep 13, 2025
e2ac1d7
error check
go-while Sep 13, 2025
a495ce1
Sanitize on reply: subject + body
go-while Sep 13, 2025
641c3f6
declare less
go-while Sep 13, 2025
f04df47
Update web_sitePostPage.go
go-while Sep 13, 2025
baaece9
remove unused code
go-while Sep 13, 2025
18bd290
int64
go-while Sep 13, 2025
00f057c
PostQueue
go-while Sep 13, 2025
010a742
pre_processArticle
go-while Sep 13, 2025
256adce
fail on errs
go-while Sep 13, 2025
3c1efe2
post-queue
go-while Sep 13, 2025
76028dc
typo
go-while Sep 13, 2025
68b9859
ADD COLUMN in_processing
go-while Sep 13, 2025
e65dee4
add postQueueWorker
go-while Sep 13, 2025
9780404
fmt whitespace
go-while Sep 13, 2025
2d0e5dc
Update 0016_main_add_message_id_to_post_queue.sql
go-while Sep 13, 2025
f0e23f2
fix references
go-while Sep 13, 2025
f31adea
boot proc
go-while Sep 13, 2025
722de48
Create build_post-queue.sh
go-while Sep 13, 2025
5d2a403
Update build_ALL.sh
go-while Sep 13, 2025
8894bce
withPath
go-while Sep 13, 2025
cf60a71
fix Newsgroups header
go-while Sep 14, 2025
bbbf15d
fix reply references
go-while Sep 14, 2025
986e5d2
fix newsgroups header
go-while Sep 14, 2025
19c0ba7
restore headers map
go-while Sep 14, 2025
08efb10
fix RefSlice
go-while Sep 14, 2025
2faa2d4
fix wrong pointer
go-while Sep 14, 2025
751481d
ReconstructHeaders args
go-while Sep 14, 2025
fe778ac
fix nil map
go-while Sep 14, 2025
8419ab0
patch posting
go-while Sep 14, 2025
9ddde36
MainDBGetNewsgroupByID
go-while Sep 16, 2025
83ff2ba
add X-Path to posting
go-while Sep 16, 2025
2247c63
testing nntp-transfer: proxy and date filter
go-while Sep 16, 2025
bf25a38
typo
go-while Sep 16, 2025
7db54c4
data race
go-while Sep 16, 2025
060213c
remove flag: -nntphostname
go-while Sep 16, 2025
bc7e67d
log debug
go-while Sep 16, 2025
7c05c1d
ReconstructHeaders path .TX
go-while Sep 16, 2025
62bffb4
Update main.go
go-while Sep 16, 2025
1cd75a0
remove flag -nntphostname
go-while Sep 16, 2025
044625b
unused vars, fetcher does not have a local nntp-server
go-while Sep 16, 2025
eda3f8c
prep nntp-server
go-while Sep 16, 2025
d117b08
IgnoreHeadersMap[strings.ToLower(header)]
go-while Sep 16, 2025
38356ac
manipulate date header
go-while Sep 16, 2025
85d8d4a
header tests
go-while Sep 16, 2025
557b763
denoise Lowercase header debug log
go-while Sep 16, 2025
f0dd686
denoise dateHeader debug log
go-while Sep 16, 2025
ee1ca3d
debug counters
go-while Sep 16, 2025
396ca9f
takeThisMode counter
go-while Sep 16, 2025
8f644f9
takeThisMode counter
go-while Sep 16, 2025
3bcde35
ttMode flip-flop
go-while Sep 16, 2025
d0390bc
denoise debug log: VerboseHeaders
go-while Sep 16, 2025
2e55441
Update main.go
go-while Sep 16, 2025
f88f248
change defaults
go-while Sep 16, 2025
87554b0
fix unlock of unlocked mutex
go-while Sep 17, 2025
904b64b
add cmd: tcp2tor
go-while Sep 18, 2025
55d2b3f
Update build.sh
go-while Sep 18, 2025
0a0cb89
Update .gitignore
go-while Sep 18, 2025
a78d136
Create build_tcp2tor.sh
go-while Sep 18, 2025
c5249a5
Update build_ALL.sh
go-while Sep 18, 2025
32c9cad
Update release.yml
go-while Sep 18, 2025
b8e0ec2
Update release.yml
go-while Sep 18, 2025
a1b2627
Update release.yml
go-while Sep 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 30 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,28 @@ jobs:
- name: Build all binaries
run: |
VERSION=$(cat appVersion.txt)

#
# disabled binaries:
#"merge-active:merge-active"
#"merge-descriptions:merge-descriptions"
#"test-MsgIdItemCache:test-MsgIdItemCache"
#"history-rebuild:history-rebuild"
#"fix-references:fix-references"
#
#
# List of all applications to build
apps=(
"web:webserver"
"nntp-fetcher:pugleaf-fetcher"
"nntp-server:pugleaf-nntp-server"
"expire-news:expire-news"
"merge-active:merge-active"
"merge-descriptions:merge-descriptions"
"test-MsgIdItemCache:test-MsgIdItemCache"
"history-rebuild:history-rebuild"
"fix-references:fix-references"
"fix-thread-activity:fix-thread-activity"
"rslight-importer:rslight-importer"
"nntp-analyze:nntp-analyze"
"recover-db:recover-db"
"nntp-transfer:nntp-transfer"
"post-queue:post-queue"
"tcp2tor:tcp2tor"
)

for app in "${apps[@]}"; do
Expand Down Expand Up @@ -114,12 +120,12 @@ jobs:
OS="${{ matrix.os }}"
ARCH="${{ matrix.arch }}"
CHECKSUMS_FILE="checksums-${OS}-${ARCH}.sha256"

echo "Generating SHA256 checksums for ${OS}-${ARCH} binaries..."
cd build
sha256sum * > "../${CHECKSUMS_FILE}"
cd ..

echo "CHECKSUMS_FILE=${CHECKSUMS_FILE}" >> $GITHUB_ENV
echo ""
echo "Generated checksums for ${OS}-${ARCH}:"
Expand All @@ -132,10 +138,10 @@ jobs:
OS="${{ matrix.os }}"
ARCH="${{ matrix.arch }}"
ARCHIVE_NAME="go-pugleaf-v${VERSION}-${OS}-${ARCH}"

# Include checksums in the archive
cp "${{ env.CHECKSUMS_FILE }}" build/checksums.sha256

if [ "${{ matrix.os }}" = "windows" ]; then
zip -r "${ARCHIVE_NAME}.zip" build/ README.md LICENSE
echo "ARCHIVE_FILE=${ARCHIVE_NAME}.zip" >> $GITHUB_ENV
Expand Down Expand Up @@ -184,13 +190,13 @@ jobs:
echo "# Go-Pugleaf v${{ steps.version.outputs.version }} - SHA256 Checksums" > SHA256SUMS.txt
echo "# Generated on $(date -u '+%Y-%m-%d %H:%M:%S UTC')" >> SHA256SUMS.txt
echo "" >> SHA256SUMS.txt

# Process each platform's checksums
for artifact_dir in artifacts/go-pugleaf-*; do
if [ -d "$artifact_dir" ]; then
platform=$(basename "$artifact_dir" | sed 's/go-pugleaf-//')
echo "## Platform: $platform" >> SHA256SUMS.txt

# Find and process checksums file for this platform
checksums_file=$(find "$artifact_dir" -name "checksums-*.sha256" | head -1)
if [ -f "$checksums_file" ]; then
Expand All @@ -205,7 +211,7 @@ jobs:
echo "" >> SHA256SUMS.txt
fi
done

echo "Comprehensive checksums file created:"
echo "====================================="
cat SHA256SUMS.txt
Expand All @@ -225,15 +231,20 @@ jobs:
- `pugleaf-fetcher` - Article fetcher from NNTP providers
- `pugleaf-nntp-server` - NNTP server implementation
- `expire-news` - Article expiration tool
- `merge-active` - Active file merger
- `merge-descriptions` - Description file merger
- `test-MsgIdItemCache` - Cache testing tool
- `history-rebuild` - History rebuild utility
- `fix-references` - Reference fixing tool
- `fix-thread-activity` - Thread activity fixer
- `rslight-importer` - RSLight data importer
- `nntp-analyze` - NNTP analysis tool
- `recover-db` - Database recovery tool
- `nntp-transfer` - Tool to transfer newsgroups
- `post-queue` - Tool to send out queued posts
- `tcp2tor` - TCP to Tor proxy

## NOT included:
- `fix-references` - Reference fixing tool
- `history-rebuild` - History rebuild utility
- `merge-active` - Active file merger
- `merge-descriptions` - Description file merger
- `test-MsgIdItemCache` - Cache testing tool

### Platform Support:
- Linux (amd64, arm64)
Expand All @@ -250,7 +261,7 @@ jobs:
```bash
# Verify individual platform binaries
sha256sum -c checksums-linux-amd64.sha256

# Verify after archive extraction
tar -xzf go-pugleaf-v${{ steps.version.outputs.version }}-linux-amd64.tar.gz
cd build/
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ go.work
/new*
/demo_history
internal/nntp/analysis_*
getUpdate.sh
update.tar.gz
checksums.sha256
checksums.sha256.archive
Expand All @@ -37,3 +38,5 @@ active_files/local-mode.active.new
active_files/local-mode.active.new.sorted
active_files/local-mode.active
/old_overview
cmd/tcp2tor/tcp2tor
cmd/tcp2tor/tcp2tor.sha256
1 change: 1 addition & 0 deletions Build_DEV.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rm -v build/*
#./build_analyze.sh
./build_fetcher.sh
./build_webserver.sh
./build_nntp-transfer.sh
#./build_recover-db.sh
#./build_expire-news.sh

Expand Down
37 changes: 21 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ su pugleaf
cd /home/pugleaf
git clone https://github.com/go-while/go-pugleaf.git
cd go-pugleaf
git checkout testing-001

# Warning: Nightly patches may be unstable or contain bugs
# Only switch to the testing branch if you understand the risks or a dev told you to test a Patch!
# git checkout testing-001
git checkout main

# Build all binaries (outputs to ./build)
./build_ALL.sh && cp build/* .
Expand All @@ -65,7 +69,7 @@ mv build/usermgr .
- Or bulk import newsgroups:
```bash
./webserver -import-active preload/active.txt -nntphostname your.domain.com
./webserver -update-desc preload/newsgroups.descriptions -nntphostname your.domain.com
./webserver -update-descr preload/newsgroups.descriptions -nntphostname your.domain.com
./rslight-importer -data data -etc etc -spool spool -nntphostname your.domain.com
```
- rslight section import: see etc/menu.conf and creating sections aka folders in etc/ containing a groups.txt (e.g., etc/section/groups.txt)
Expand Down Expand Up @@ -243,11 +247,8 @@ go-pugleaf includes command-line applications for various newsgroup management t

**Server Configuration:**
- `-webport int` - Web server port (default: 11980 (no ssl) or 19443 (webssl))
- `-withnntp` - Start NNTP server with default ports 1119/1563
- `-nntptcpport int` - NNTP TCP port
- `-nntptlsport int` - NNTP TLS port
- `-withfetch` - Enable internal Cronjob to fetch new articles
- `-isleep int` - Sleeps in fetch routines (default: 300 seconds = 5min)

**Cache Configuration:**
- `-maxsanartcache int` - Maximum number of cached sanitized articles (default: 10000)
Expand All @@ -262,10 +263,15 @@ go-pugleaf includes command-line applications for various newsgroup management t
- `-import-desc string` - Import newsgroups from descriptions file
- `-import-create` - Create missing newsgroups when importing
- `-write-active-file string` - Write NNTP active file to specified path
- `-write-active-only` - Use with -write-active-file (false writes only non active groups!) (default: true)
- `-update-descr` - Update newsgroup descriptions from file
- `-repair-watermarks` - Repair corrupted newsgroup watermarks
- `-update-newsgroup-activity` - Update newsgroup activity timestamps
- `-update-newsgroups-hide-futureposts` - Hide articles posted > 48h in future
- `-compare-active string` - Compare active file with database and show missing groups (format: groupname highwater lowwater status)
- `-compare-active-min-articles int64` - Use with -compare-active: only show groups with more than N articles (calculated as high-low)
- `-rsync-inactive-groups string` - Path to new data dir, uses rsync to copy all inactive group databases to new data folder
- `-rsync-remove-source` - Use with -rsync-inactive-groups. If set, removes source files after moving inactive groups (default: false)

**Bridge Features: (NOT WORKING!)**
- `-enable-fediverse` - Enable Fediverse bridge
Expand All @@ -277,8 +283,13 @@ go-pugleaf includes command-line applications for various newsgroup management t
- `-matrix-userid string` - Matrix user ID

**Advanced Options:**
- `-useshorthashlen int` - Short hash length for history storage (2-7, default: 7)
- `-ignore-initial-tiny-groups int` - Ignore tiny groups with fewer articles (default: 0)
- `-useshorthashlen int` - Short hash length for history storage (2-7, default: 7) - NOTE: cannot be changed once set!

**Disabled Options (commented out in code):**
- `# -withnntp` - Start NNTP server with default ports 1119/1563
- `# -withfetch` - Enable internal Cronjob to fetch new articles
- `# -isleep int` - Sleeps in fetch routines (default: 300 seconds = 5min)
- `# -ignore-initial-tiny-groups int` - Ignore tiny groups with fewer articles (default: 0)

#### `pugleaf-fetcher` (cmd/nntp-fetcher)
**Article fetcher from NNTP providers**
Expand All @@ -289,15 +300,6 @@ go-pugleaf includes command-line applications for various newsgroup management t
**Required Flags:**
- `-nntphostname string` - Your hostname must be set!

**Connection Configuration:**
- `-host string` - NNTP hostname (default: "81-171-22-215.pugleaf.net")
- `-port int` - NNTP port (default: 563)
- `-username string` - NNTP username (default: "read")
- `-password string` - NNTP password (default: "only")
- `-ssl` - Use SSL/TLS connection (default: true)
- `-timeout int` - Connection timeout in seconds (default: 30)
- `-message-id string` - Test specific message ID

**Fetching Options:**
- `-group string` - Newsgroup to fetch (empty = all groups or wildcard like rocksolid.*)
- `-download-start-date string` - Start downloading from date (YYYY-MM-DD format)
Expand All @@ -307,10 +309,13 @@ go-pugleaf includes command-line applications for various newsgroup management t
- `-max-batch int` - Maximum articles per batch (default: 128, recommended: 100)
- `-max-batch-threads int` - Concurrent newsgroup batches (default: 16)
- `-max-loops int` - Loop a group this many times (default: 1)
- `-max-queue int` - Limit db_batch to have max N articles queued over all newsgroups (default: 16384)
- `-download-max-par int` - Groups in parallel (default: 1, can consume memory!)
- `-useshorthashlen int` - Short hash length for history (2-7, default: 7)

**Advanced Options:**
- `-ignore-initial-tiny-groups int64` - Ignore tiny groups with fewer articles during initial fetch (default: 0)
- `-update-newsgroups-from-remote string` - Fetch remote newsgroup list and add new groups (empty = disabled, use "group.*" or "$all")
- `-xover-copy` - Copy xover data from remote server (default: false)
- `-test-conn` - Test connection and exit (default: false)
- `-help` - Show usage examples and exit
Expand Down
114 changes: 114 additions & 0 deletions THREAD_REBUILD_IMPLEMENTATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Thread Rebuild Implementation
## Usage Examples

### 1. Rebuild threads for a specific newsgroup

```bash
# Rebuild threads for comp.lang.go
./recover-db -db /path/to/data -group comp.lang.go -rebuild-threads -v

# Rebuild threads for all newsgroups
./recover-db -db /path/to/data -group '$all' -rebuild-threads -v
```

### 2. Repair database with automatic thread rebuilding

```bash
# Check and repair with automatic thread rebuilding when needed
./recover-db -db /path/to/data -group comp.lang.go -repair -v
```

### 3. Check consistency first, then rebuild if needed

```bash
# First check what needs fixing
./recover-db -db /path/to/data -group comp.lang.go -v

# Then rebuild threads if orphaned threads are found
./recover-db -db /path/to/data -group comp.lang.go -rebuild-threads -v
```

## Process Flow

### Thread Rebuild Process:

1. **Validation**: Check newsgroup exists and has articles
2. **Cleanup**: Delete all existing thread-related data:
- `tree_stats` table
- `cached_trees` table
- `thread_cache` table
- `threads` table
3. **Mapping**: Build message-ID to article-number lookup table
4. **Threading**: Process articles in batches:
- Parse References header for each article
- Identify thread roots (no references)
- Find parent articles and calculate depth
- Insert thread relationships
5. **Reporting**: Generate comprehensive rebuild report


## Technical Details

### Memory Management
- Processes articles in configurable batches (default: 25,000)
- Builds message-ID mapping incrementally to handle large newsgroups
- Releases resources after each batch

### Error Handling
- Continues processing even if individual articles fail
- Reports all errors in final report
- Transactions ensure database consistency
- Graceful handling of missing references

### Performance Optimizations
- Efficient SQL queries with proper indexing
- Batch inserts for thread relationships
- Minimal memory footprint during processing
- Progress reporting for long operations

## Files Modified

1. **`internal/database/db_rescan.go`**:
- Added `RebuildThreadsFromScratch()` function
- Added `processThreadBatch()` helper function
- Added `parseReferences()` utility function
- Added `ThreadRebuildReport` struct and methods
- Added necessary imports (strings, time)

2. **`cmd/recover-db/main.go`**:
- Added `--rebuild-threads` command line flag
- Added standalone thread rebuild mode
- Added automatic thread rebuilding after repairs
- Enhanced help text and output formatting

## Future Enhancements

1. **Performance improvements**:
- Parallel processing for very large newsgroups
- Configurable batch sizes
- Memory usage optimization

2. **Additional features**:
- Incremental thread rebuilding (only rebuild changed threads)
- Thread validation without full rebuild
- Integration with web interface for manual triggering

3. **Monitoring**:
- Thread rebuild scheduling
- Automatic detection of thread corruption
- Performance metrics and alerts

## Testing

Test the implementation with:

```bash
# Test with a small newsgroup first
./recover-db -db ./data -group test.newsgroup -rebuild-threads -v

# Test repair with thread rebuilding
./recover-db -db ./data -group test.newsgroup -repair -v

# Test with all newsgroups (use carefully!)
./recover-db -db ./data -group '$all' -rebuild-threads -v
```
2 changes: 1 addition & 1 deletion appVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.7.0
4.7.1
3 changes: 3 additions & 0 deletions build_ALL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ rm -v build/*
./build_webserver.sh
./build_recover-db.sh
./build_expire-news.sh
./build_nntp-transfer.sh
./build_post-queue.sh
./build_tcp2tor.sh

# Always generate checksums after building
echo "Generating checksums for built executables..."
Expand Down
3 changes: 3 additions & 0 deletions build_nntp-transfer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
echo "$0"
GOEXPERIMENT=greenteagc go build -race -o build/nntp-transfer -ldflags "-X main.appVersion=$(cat appVersion.txt)" ./cmd/nntp-transfer
4 changes: 4 additions & 0 deletions build_post-queue.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
echo "$0"
GOEXPERIMENT=greenteagc go build -race -o build/post-queue -ldflags "-X main.appVersion=$(cat appVersion.txt)" ./cmd/post-queue
exit $?
2 changes: 1 addition & 1 deletion build_recover-db.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
echo "$0"
go build -o build/recover-db -ldflags "-X main.appVersion=$(cat appVersion.txt)" ./cmd/recover-db
GOEXPERIMENT=greenteagc go build -o build/recover-db -ldflags "-X main.appVersion=$(cat appVersion.txt)" ./cmd/recover-db
4 changes: 4 additions & 0 deletions build_tcp2tor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
echo "$0"
GOEXPERIMENT=greenteagc go build -race -o build/tcp2tor -ldflags "-X main.appVersion=$(cat appVersion.txt)" ./cmd/tcp2tor/
exit $?
Loading