-
Notifications
You must be signed in to change notification settings - Fork 468
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
db: iterator creation is fallible #2994
Comments
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 11, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small DSL. Future work will build off this to test handling of I/O errors during iteration. Informs cockroachdb#1115. Informs cockroachdb#2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 11, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small DSL. Future work will build off this to test handling of I/O errors during iteration. Informs cockroachdb#1115. Informs cockroachdb#2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 11, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small DSL. Future work will build off this to test handling of I/O errors during iteration. Informs cockroachdb#1115. Informs cockroachdb#2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 11, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small DSL. Future work will build off this to test handling of I/O errors during iteration. Informs cockroachdb#1115. Informs cockroachdb#2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 12, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small DSL. Future work will build off this to test handling of I/O errors during iteration. Informs cockroachdb#1115. Informs cockroachdb#2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 12, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small DSL. Future work will build off this to test handling of I/O errors during iteration. Informs cockroachdb#1115. Informs cockroachdb#2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 13, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small DSL. Future work will build off this to test handling of I/O errors during iteration. Informs cockroachdb#1115. Informs cockroachdb#2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 13, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small DSL. Future work will build off this to test handling of I/O errors during iteration. Informs cockroachdb#1115. Informs cockroachdb#2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 13, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small DSL. Future work will build off this to test handling of I/O errors during iteration. Informs cockroachdb#1115. Informs cockroachdb#2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 13, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small DSL. Future work will build off this to test handling of I/O errors during iteration. Informs cockroachdb#1115. Informs cockroachdb#2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 16, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small lisp-like DSL. Future work will build off this to test handling of I/O errors during iteration. Informs cockroachdb#1115. Informs cockroachdb#2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 16, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small lisp-like DSL. Future work will build off this to test handling of I/O errors during iteration. Informs cockroachdb#1115. Informs cockroachdb#2994.
jbowens
added a commit
that referenced
this issue
Oct 16, 2023
We frequently use the errorfs package to inject errors into filesystem operations to test error code paths. This commit builds off this package to support encoding error injection conditions within datadriven tests through parsing a small lisp-like DSL. Future work will build off this to test handling of I/O errors during iteration. Informs #1115. Informs #2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 17, 2023
Previously, construction of an iterator over range keys that found sstables containing range keys within L0 performed I/O to load the range key blocks during iterator construction. This was less efficient: If the iterator ultimately didn't need to read the keyspace overlapping the sstables containing range keys, the block loads were unnecessary. More significantly, if the I/O failed during iterator construction, the resulting iterator was unusable. It would always error with the original error returned by the failed block load. This is a deviation from iterator error handling across the rest of the iterator stack, which allows an Iterator to be re-seeked to clear the current iterator error. Resolves cockroachdb#2994.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Oct 17, 2023
Previously, construction of an iterator over range keys that found sstables containing range keys within L0 performed I/O to load the range key blocks during iterator construction. This was less efficient: If the iterator ultimately didn't need to read the keyspace overlapping the sstables containing range keys, the block loads were unnecessary. More significantly, if the I/O failed during iterator construction, the resulting iterator was unusable. It would always error with the original error returned by the failed block load. This is a deviation from iterator error handling across the rest of the iterator stack, which allows an Iterator to be re-seeked to clear the current iterator error. Resolves cockroachdb#2994.
jbowens
added a commit
that referenced
this issue
Oct 20, 2023
Previously, construction of an iterator over range keys that found sstables containing range keys within L0 performed I/O to load the range key blocks during iterator construction. This was less efficient: If the iterator ultimately didn't need to read the keyspace overlapping the sstables containing range keys, the block loads were unnecessary. More significantly, if the I/O failed during iterator construction, the resulting iterator was unusable. It would always error with the original error returned by the failed block load. This is a deviation from iterator error handling across the rest of the iterator stack, which allows an Iterator to be re-seeked to clear the current iterator error. Resolves #2994.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Relates to #1115.
The pebble Iterator is generally designed to tolerate errors. If an iterator operation errors, resulting in
Iterator.Error()
returning a non-nil error, the expectation is that the user may seek theIterator
again, and the previous error is cleared. There's at least 1 violation of this contract in which an I/O error encountered during iterator construction results in anIterator
that will always error.If L0 contains any range keys, each file in L0 containing the range keys is opened during iterator construction. If opening the file encounters an error, then a keyspan.Iter that always errors is used, preventing any
Iterator
operation from succeeding:pebble/range_keys.go
Line 73 in 36b3f57
We should not perform any I/O during the iterator creation itself.
The text was updated successfully, but these errors were encountered: