You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 💪 **Offline capability** - works without network
1460
1461
1462
+
### Limitations and Known Issues
1463
+
1464
+
#### freeze_replica/1 - NOT SUPPORTED
1465
+
1466
+
The `EctoLibSql.Native.freeze_replica/1` function is **not implemented**. This function was intended to convert a remote replica into a standalone local database (useful for disaster recovery or field deployments).
1467
+
1468
+
**Status**: ⛔ Not supported - returns `{:error, :unsupported}`
1469
+
1470
+
**Why**: Converting a replica to primary requires taking ownership of the database connection, which is held in a shared `Arc<Mutex<>>` within the connection pool. This requires deep refactoring of the connection pool architecture that hasn't been completed.
1471
+
1472
+
**Workarounds** for disaster recovery scenarios:
1473
+
1474
+
1.**Backup and restore**: Copy the replica database file and use it independently
1475
+
```bash
1476
+
cp replica.db standalone.db
1477
+
# Configure your app to use standalone.db directly
1478
+
```
1479
+
1480
+
2.**Data replication**: Replicate all data to a new local database
1481
+
```elixir
1482
+
# In your application, read from replica and write to new local database
### Task 7: Marking Functions as Explicitly Unsupported
839
+
840
+
**Pattern**: When a function promised in the public API cannot be implemented due to architectural constraints, explicitly mark it as unsupported rather than hiding it or returning vague errors.
841
+
842
+
**Example**: The `freeze_database` NIF (promoting a replica to primary) cannot be implemented without deep refactoring of the connection pool architecture.
843
+
844
+
**Steps**:
845
+
846
+
1. **Update Rust NIF** to return a clear `:unsupported` atom error:
0 commit comments