Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Minds Frontend
Minds Frontend
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 827
    • Issues 827
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 65
    • Merge Requests 65
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Registry
    • Registry
  • Packages
    • Packages
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds FrontendMinds Frontend
  • Merge Requests
  • !350

Open
Opened 20 hours ago by Emiliano Balbuena@edgebal
  • Report abuse
Report abuse

(fix): Self-healing IDB store

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch https://gitlab.com/edgebal/front.git hotfix/idb-corruption-1
git checkout -b edgebal/front-hotfix/idb-corruption-1 FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/master
git merge --no-ff edgebal/front-hotfix/idb-corruption-1

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Request to merge edgebal:hotfix/idb-corruption-1 into master
Open in Web IDE
  • Email patches
  • Plain diff
Pipeline #65957107 (#512) passed for 0e506f69 on edgebal:hotfix/idb-corruption-1
    Requires 2 more approvals from Devs.
    Ben Hayward
    Ben Hayward
    Mark Harding
    Mark Harding
    Brian Hatchet
    Brian Hatchet
    Marcelo Rivera
    Marcelo Rivera
    Martin Santangelo
    Martin Santangelo
    Ready to be merged automatically. Ask someone with write access to this repository to merge this request

    Allows commits from members who can merge to the target branch

    Deletes source branch

    • Discussion 3
    • Commits 2
    • Pipelines 2
    • Changes 4
    0/3 discussions resolved
    • Loading...
    • Emiliano Balbuena @edgebal added 1 commit 20 hours ago

      added 1 commit

      • 0e506f69 - (chore): Missing semicolons

      Compare with previous version

    • Brian Hatchet
      Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 3 hours ago
      src/app/lib/minds-sync/adapters/DexieStorageAdapter.js
      40 54 return true;
      41 55 }
      42 56
      57 /**
      58 * @returns {Promise<boolean>}
      59 */
      60 async consistencyCheck() {
      61 const verno = this.db.verno;
      62 const schema = this._schemas.find(schema => verno === schema.versionNumber);
      63
      64 if (!schema) {
      65 console.warn(`Consistency check for ${this.db.name}: Schema for version ${verno} not found.`);
      66 return false;
      67 }
      68
      69 console.info(`Checking ${this.db.name} consistency...`);
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet · 3 hours ago
        Maintainer

        Console log here

      Please register or sign in to reply
    • Brian Hatchet
      Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 3 hours ago
      src/app/lib/minds-sync/adapters/DexieStorageAdapter.js
      74 for (let table of tables) {
      75 try {
      76 const idbTable = this.db.table(table);
      77 await idbTable.count();
      78 } catch (e) {
      79 console.info(`Consistency check for ${table} on ${this.db.name}. Got: [${e.name}] ${e.message}`);
      80 healthy = false;
      81 }
      82
      83 if (!healthy) {
      84 break;
      85 }
      86 }
      87
      88 if (healthy) {
      89 console.info(`Consistency check for ${this.db.name}: OK!`);
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet · 3 hours ago
        Maintainer

        Are we deliberately shipping console.infos to prod for diagnostic purposes? Feels like we should be capturing user logs to a central endpoint (like loggly, but our own or open source)

      Please register or sign in to reply
    • Brian Hatchet
      Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 3 hours ago
      src/app/lib/minds-sync/adapters/DexieStorageAdapter.js
      31 36 /**
      32 37 * @returns {Promise<boolean>}
      33 38 */
      34 async ready() {
      39 ready() {
      35 40 if (!this.isReady) {
      36 await this.db.open();
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet · 3 hours ago
        Maintainer

        Can this blow up?

      Please register or sign in to reply
    • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
    Please register or sign in to reply
    Assignee
    Emiliano Balbuena's avatar Emiliano Balbuena @edgebal
    Assign to
    None
    Milestone
    None
    Assign milestone
    None
    Time tracking
    No estimate or time spent
    0
    Labels
    None
    Assign labels
    • View project labels
    Lock merge request
    Unlocked
    6
    6 participants
    user avatar
    Ben Hayward
    user avatar
    Mark Harding
    user avatar
    Brian Hatchet
    user avatar
    Marcelo Rivera
    user avatar
    Martin Santangelo
    user avatar
    Emiliano Balbuena
    Reference: minds/front!350