-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API to update a note #1013
Comments
Updating a note, is actually a non-trivial thing, other than creating one. Lines 119 to 177 in d3ec67b
(And yes, here is space for internal optimizations) So I don't see this happen in 1.3.0 but maybe in a future release. |
Why not allow to use regular patch files for changes? Diff-match-patch should support that right? We could alternatively just allow anybody to update a note completely (and we can return the patch). |
The problem is not with "how would someone provide a change" - both patch and "post it all" would accomplish that. The problem lies in the things that would have to follow from that change, namely at least: generating the OT version of that patch and distributing it to all connected parties and changing the note metadata. I take @SISheogorath's comment to mean "patches welcome". |
- Abandon the idea of bidirectional sync, due to hackmdio/codimd#1013 - Therefore, revert everything chokidar, and the `initialScan` of the PostgreSQL database - We only track changes after the syncer starts syncing - Last command-line argument designates the directory to sync to - AtomicCompareUpdateFile class that does the ole `O_WRONLY | O_CREAT | O_EXCL` dance to create a backup file, then uses `write-file-atomic` to update the main file, then deletes the backup file if and only if it is known to be useless (i.e. equal to the `oldContent` of the PostgreSQL event) - Use a `defer()` + `concatAll()` combo to prevent multiple attempts to save to the file system from occuring in parallel - Touch up Dockerfile + docker-compose rig
…ile-maintenance Lock file maintenance (master)
It exists the API for creating note but doesn't for updating note.
The text was updated successfully, but these errors were encountered: