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

Android: should throw meaningful errors when the 1MB CursorWindow limit is reached #46

Open
nolanlawson opened this issue Dec 18, 2016 · 3 comments

Comments

@nolanlawson
Copy link
Owner

Currently these errors just get swallowed, e.g.: pouchdb/pouchdb#5413

We just return empty results which causes bugs later on down the line that are hard to diagnose:

} catch (Throwable e) {
if (DEBUG_MODE) {
e.printStackTrace();
}

@nolanlawson
Copy link
Owner Author

nolanlawson commented Dec 18, 2016

Hm interestingly this doesn't seem to actually throw an error we can catch; it just returns empty rows. Although it does log:

12-18 12:49:43.189 21171 21346 W CursorWindow: Window is full: requested allocation 2236848 bytes, free space 2096672 bytes, window size 2097152 bytes
12-18 12:49:43.205 21171 21346 W CursorWindow: Window is full: requested allocation 2236848 bytes, free space 2096672 bytes, window size 2097152 bytes

@nolanlawson
Copy link
Owner Author

Hm from googling around I really don't see any way to actually detect this error in code. 😕

@nolanlawson nolanlawson changed the title Android: should throw meaningful errors when the 1MB limit is reached Android: should throw meaningful errors when the 1MB CursorWindow limit is reached Dec 18, 2016
@knubie
Copy link

knubie commented Oct 6, 2022

Related issue at andpor/react-native-sqlite-storage#364

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

No branches or pull requests

2 participants