Skip to content
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

Index creation for capped collection fails #87

Closed
j13z opened this issue Dec 24, 2016 · 1 comment
Closed

Index creation for capped collection fails #87

j13z opened this issue Dec 24, 2016 · 1 comment

Comments

@j13z
Copy link
Contributor

j13z commented Dec 24, 2016

Hi,

I found an issue in the createCollection function that results in an unhandled promise rejection when using a capped collection ({ … capped: true, cappedMax: <n> … }) without TTL (expireAfterSeconds not set). There's a bug in the conditional at line 118, which causes the deletion of a non-existing index:

https://github.com/winstonjs/winston-mongodb/blob/master/lib/winston-mongodb.js#L118

With MongoDB 3.0.14, the indexInformation response has no expireAfterSeconds property, i.e. undefined, but self.expireAfterSeconds is false.

I created a pull request (#88) that fixes the issue. Would be nice if you could merge it and create a patch release. Thanks.

@yurijmikhalevich
Copy link
Member

Merged. Published. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants