Skip to content

[BUG] NeugDBService never updates running_, causing false stop-state reporting #203

@d1zzy126

Description

@d1zzy126

Describe the bug
NeugDBService has a running_ atomic that is consulted by IsRunning(), service_status(), and Stop(), but that state is never updated on successful start or stop. As a result, Stop() can immediately print NeugDB service has not been started! right after a successful serve(), and the service's internal running-state reporting is inconsistent with reality.

Execution Logs
Minimal Python reproducer:

from neug.database import Database

db = Database("", "w")
db.serve(19001, "127.0.0.1", False)
db.stop_serving()
db.close()

This reproducer emits the incorrect stop-state message immediately after a successful serve().

Expected behavior
After a successful serve(), the service should be considered running. IsRunning() and service_status() should reflect that state, and stop_serving() should not claim the service was never started.

Error Message
Observed output:

NeugDB service has not been started!

Source inspection shows that running_ exists in the service object and is used by IsRunning(), service_status(), and Stop(), but Start() and Stop() never set or clear it, so IsRunning() remains false throughout the service lifetime.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions