-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add faulty file system for io failure injections #9457
Conversation
✅ Deploy Preview for meta-velox canceled.
|
57630af
to
544c6d9
Compare
@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
/// 'opTypes' is empty, it injects error for all kinds of file operation | ||
/// types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we want to be explicit here. I could be easy to get confused. If none is provided, should we just not inject? Can we add Type::kAll to indicate that we want to inject to all operations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is common to treat an empty set to match all. User will only call this method to inject fault.
// Defines the file injection setup and only one type of injection can be set | ||
// at a time. | ||
struct FileInjections { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean either delay type or exception type can be set? If so can we make members const? Otherwise direct access to members can make this struct in an inconsistent state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a default case used to copy the injection settings. I will add some sanity check on the execution path. This is a private structure used internally.
49bd2c3
to
98a300c
Compare
@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
a51d498
to
21f5227
Compare
@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
b043084
to
3af7411
Compare
This pull request was exported from Phabricator. Differential Revision: D56079500 |
) Summary: Add faulty file system to allow us to inject failure for low-level file operations in unit and fuzzer test. It is implemented under velox filesystem. It is wrapper on top of the real file system, it either inject errors or delegate the file operations to the underlying file system. We extend TempDirectoryPath or TempFilePath to allow user to specify whether enable fault injection or not in test. If it does, it returns the file or directory path with faulty file system scheme prefix (faulty:). This allows the velox file system to open the file through faulty file system and by removing the faulty fs scheme prefix, it can delegate the file operation to the corresponding underlying file system. We support three kinds of file fault injections: (1) error injection which throws for a set (or all) file operation types; (2) delay injection for a set (or all) file operation types; (3) custom injection with user provided fault injection hook. We define the base structure FaultFileOperation to capture the file fault injection parameters and each file api will extend with its own operation type. This PR only supports fault injection for read file operations. Next we will extend to other file operation types as well as fs operation types. Pull Request resolved: facebookincubator#9457 Reviewed By: tanjialiang, oerling Differential Revision: D56079500 Pulled By: xiaoxmeng
) Summary: Add faulty file system to allow us to inject failure for low-level file operations in unit and fuzzer test. It is implemented under velox filesystem. It is wrapper on top of the real file system, it either inject errors or delegate the file operations to the underlying file system. We extend TempDirectoryPath or TempFilePath to allow user to specify whether enable fault injection or not in test. If it does, it returns the file or directory path with faulty file system scheme prefix (faulty:). This allows the velox file system to open the file through faulty file system and by removing the faulty fs scheme prefix, it can delegate the file operation to the corresponding underlying file system. We support three kinds of file fault injections: (1) error injection which throws for a set (or all) file operation types; (2) delay injection for a set (or all) file operation types; (3) custom injection with user provided fault injection hook. We define the base structure FaultFileOperation to capture the file fault injection parameters and each file api will extend with its own operation type. This PR only supports fault injection for read file operations. Next we will extend to other file operation types as well as fs operation types. Pull Request resolved: facebookincubator#9457 Reviewed By: tanjialiang, oerling Differential Revision: D56079500 Pulled By: xiaoxmeng
This pull request was exported from Phabricator. Differential Revision: D56079500 |
) Summary: Add faulty file system to allow us to inject failure for low-level file operations in unit and fuzzer test. It is implemented under velox filesystem. It is wrapper on top of the real file system, it either inject errors or delegate the file operations to the underlying file system. We extend TempDirectoryPath or TempFilePath to allow user to specify whether enable fault injection or not in test. If it does, it returns the file or directory path with faulty file system scheme prefix (faulty:). This allows the velox file system to open the file through faulty file system and by removing the faulty fs scheme prefix, it can delegate the file operation to the corresponding underlying file system. We support three kinds of file fault injections: (1) error injection which throws for a set (or all) file operation types; (2) delay injection for a set (or all) file operation types; (3) custom injection with user provided fault injection hook. We define the base structure FaultFileOperation to capture the file fault injection parameters and each file api will extend with its own operation type. This PR only supports fault injection for read file operations. Next we will extend to other file operation types as well as fs operation types. Pull Request resolved: facebookincubator#9457 Reviewed By: tanjialiang, oerling Differential Revision: D56079500 Pulled By: xiaoxmeng
This pull request was exported from Phabricator. Differential Revision: D56079500 |
) Summary: Add faulty file system to allow us to inject failure for low-level file operations in unit and fuzzer test. It is implemented under velox filesystem. It is wrapper on top of the real file system, it either inject errors or delegate the file operations to the underlying file system. We extend TempDirectoryPath or TempFilePath to allow user to specify whether enable fault injection or not in test. If it does, it returns the file or directory path with faulty file system scheme prefix (faulty:). This allows the velox file system to open the file through faulty file system and by removing the faulty fs scheme prefix, it can delegate the file operation to the corresponding underlying file system. We support three kinds of file fault injections: (1) error injection which throws for a set (or all) file operation types; (2) delay injection for a set (or all) file operation types; (3) custom injection with user provided fault injection hook. We define the base structure FaultFileOperation to capture the file fault injection parameters and each file api will extend with its own operation type. This PR only supports fault injection for read file operations. Next we will extend to other file operation types as well as fs operation types. Pull Request resolved: facebookincubator#9457 Reviewed By: tanjialiang, oerling Differential Revision: D56079500 Pulled By: xiaoxmeng
This pull request was exported from Phabricator. Differential Revision: D56079500 |
This pull request was exported from Phabricator. Differential Revision: D56079500 |
) Summary: Add faulty file system to allow us to inject failure for low-level file operations in unit and fuzzer test. It is implemented under velox filesystem. It is wrapper on top of the real file system, it either inject errors or delegate the file operations to the underlying file system. We extend TempDirectoryPath or TempFilePath to allow user to specify whether enable fault injection or not in test. If it does, it returns the file or directory path with faulty file system scheme prefix (faulty:). This allows the velox file system to open the file through faulty file system and by removing the faulty fs scheme prefix, it can delegate the file operation to the corresponding underlying file system. We support three kinds of file fault injections: (1) error injection which throws for a set (or all) file operation types; (2) delay injection for a set (or all) file operation types; (3) custom injection with user provided fault injection hook. We define the base structure FaultFileOperation to capture the file fault injection parameters and each file api will extend with its own operation type. This PR only supports fault injection for read file operations. Next we will extend to other file operation types as well as fs operation types. Pull Request resolved: facebookincubator#9457 Reviewed By: tanjialiang, oerling Differential Revision: D56079500 Pulled By: xiaoxmeng
This pull request was exported from Phabricator. Differential Revision: D56079500 |
) Summary: Add faulty file system to allow us to inject failure for low-level file operations in unit and fuzzer test. It is implemented under velox filesystem. It is wrapper on top of the real file system, it either inject errors or delegate the file operations to the underlying file system. We extend TempDirectoryPath or TempFilePath to allow user to specify whether enable fault injection or not in test. If it does, it returns the file or directory path with faulty file system scheme prefix (faulty:). This allows the velox file system to open the file through faulty file system and by removing the faulty fs scheme prefix, it can delegate the file operation to the corresponding underlying file system. We support three kinds of file fault injections: (1) error injection which throws for a set (or all) file operation types; (2) delay injection for a set (or all) file operation types; (3) custom injection with user provided fault injection hook. We define the base structure FaultFileOperation to capture the file fault injection parameters and each file api will extend with its own operation type. This PR only supports fault injection for read file operations. Next we will extend to other file operation types as well as fs operation types. Pull Request resolved: facebookincubator#9457 Reviewed By: tanjialiang, oerling Differential Revision: D56079500 Pulled By: xiaoxmeng
) Summary: Add faulty file system to allow us to inject failure for low-level file operations in unit and fuzzer test. It is implemented under velox filesystem. It is wrapper on top of the real file system, it either inject errors or delegate the file operations to the underlying file system. We extend TempDirectoryPath or TempFilePath to allow user to specify whether enable fault injection or not in test. If it does, it returns the file or directory path with faulty file system scheme prefix (faulty:). This allows the velox file system to open the file through faulty file system and by removing the faulty fs scheme prefix, it can delegate the file operation to the corresponding underlying file system. We support three kinds of file fault injections: (1) error injection which throws for a set (or all) file operation types; (2) delay injection for a set (or all) file operation types; (3) custom injection with user provided fault injection hook. We define the base structure FaultFileOperation to capture the file fault injection parameters and each file api will extend with its own operation type. This PR only supports fault injection for read file operations. Next we will extend to other file operation types as well as fs operation types. Pull Request resolved: facebookincubator#9457 Reviewed By: tanjialiang, oerling Differential Revision: D56079500 Pulled By: xiaoxmeng
This pull request was exported from Phabricator. Differential Revision: D56079500 |
@xiaoxmeng merged this pull request in d796cfc. |
Conbench analyzed the 1 benchmark run on commit There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
) Summary: Add faulty file system to allow us to inject failure for low-level file operations in unit and fuzzer test. It is implemented under velox filesystem. It is wrapper on top of the real file system, it either inject errors or delegate the file operations to the underlying file system. We extend TempDirectoryPath or TempFilePath to allow user to specify whether enable fault injection or not in test. If it does, it returns the file or directory path with faulty file system scheme prefix (faulty:). This allows the velox file system to open the file through faulty file system and by removing the faulty fs scheme prefix, it can delegate the file operation to the corresponding underlying file system. We support three kinds of file fault injections: (1) error injection which throws for a set (or all) file operation types; (2) delay injection for a set (or all) file operation types; (3) custom injection with user provided fault injection hook. We define the base structure FaultFileOperation to capture the file fault injection parameters and each file api will extend with its own operation type. This PR only supports fault injection for read file operations. Next we will extend to other file operation types as well as fs operation types. Pull Request resolved: facebookincubator#9457 Reviewed By: tanjialiang, oerling Differential Revision: D56079500 Pulled By: xiaoxmeng fbshipit-source-id: e7cccbf0b51b3f94c161949b22a88cb560d58b7d
Add faulty file system to allow us to inject failure for low-level file operations in unit and fuzzer test.
It is implemented under velox filesystem. It is wrapper on top of the real file system, it either inject
errors or delegate the file operations to the underlying file system. We extend TempDirectoryPath or
TempFilePath to allow user to specify whether enable fault injection or not in test. If it does, it returns
the file or directory path with faulty file system scheme prefix (faulty:). This allows the velox file system
to open the file through faulty file system and by removing the faulty fs scheme prefix, it can delegate
the file operation to the corresponding underlying file system.
We support three kinds of file fault injections: (1) error injection which throws for a set (or all) file operation
types; (2) delay injection for a set (or all) file operation types; (3) custom injection with user provided fault
injection hook. We define the base structure FaultFileOperation to capture the file fault injection parameters
and each file api will extend with its own operation type.
This PR only supports fault injection for read file operations. Next we will extend to other file operation types
as well as fs operation types.