• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

share / sharedb / 13659428866
97%

Build:
DEFAULT BRANCH: master
Ran 04 Mar 2025 05:29PM UTC
Jobs 3
Files 39
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
13659428866

push

github

web-flow
🐛 Unhandled rejection when submitting ops during hard rollback. (#692)

* 🐛 Unhandled rejection when submitting ops during hard rollback.

After doing the steps:
1. Create a doc with rich text type (or any other non irreversible type)
2. Make op submission fail
3. Now in the hard rollback we do `this._setType(null);`
4. If there is any op comming before the hard rollback `fetch` is finished, we get the error
```
Cannot submit op. Document has not been created.
```
as in the `_submit` we do:
```typescript
    if (!this.type) {
      var err = new ShareDBError(
        ERROR_CODE.ERR_DOC_DOES_NOT_EXIST,
        'Cannot submit op. Document has not been created. ' + this.collection + '.' + this.id
      );
      if (callback) return callback(err);
      return this.emit('error', err);
    }
```

We definitely do not handle this case properly. Possible solutions:
1. Just throw error whenever that happens, which is easy to implement
   and it is not really breaking. User would be then able to react on
   the error or just ignore it.
2. Store copy of cannonical snapshot in the doc itself, so that we do
   not have to do fetch for hard rollback. More difficult to implement
   and has a side effect of storing the doc twice in the memory.

* Update to call _isInHArdRollback at the top of fetch

1661 of 1874 branches covered (88.63%)

3496 of 3586 relevant lines covered (97.49%)

886.39 hits per line

Jobs
ID Job ID Ran Files Coverage
1 node-18 - 13659428866.1 04 Mar 2025 05:29PM UTC 39
97.49
GitHub Action Run
2 node-20 - 13659428866.2 04 Mar 2025 05:29PM UTC 39
97.49
GitHub Action Run
3 node-22 - 13659428866.3 04 Mar 2025 05:29PM UTC 39
97.49
GitHub Action Run
Source Files on build 13659428866
  • Tree
  • List 39
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 2b38f47e on github
  • Prev Build on master (#13659411672)
  • Next Build on master (#13671506362)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc