Since the article was written back in 2006, before the release of Windows Vista, Raymond, of course, had already given the answer. So, for the purity of the experiment, please do not spoil in the comments.
Hello everyone, you have a chance to solve one real compatibility problem. There is no answer yet: I am waiting for how you will solve it. This is a real bug in Widnows Vista tracker.
So, beta tester reported that Windows Explorer can not show more than a hundred files from network folders located on servers of a particular manufacturer. Responsible teams examined the problem, and found that the server incorrectly handles some types of requests. Despite the fact that the server stated that it supports both “fast” and “slow” requests, it returned only the first 100 files from the directory to the “fast” request, and then issued a strange error code. On the other hand, if Explorer switched to the “slow” mode, everything worked well. (“Quick” requests appeared only in Windows Vista, Windows XP only supported “slow”). Additional Information: An update to the server software that corrects this error has already been released, but the vendor continued to ship the old version of the driver.
What would you do in this situation? Here are some options, choose your own or offer a new one.
')
Nothing to do
Do not pay attention to the incorrect operation of a third-party driver. People who are not lucky to buy such a device will receive an incomplete list of files. Publish a KB explaining the problem and direct users to the vendor for an updated driver.
pros
- The operating system remains "clean", without any hacks compatibility.
Minuses
- Users with this problem may not even understand that it exists. Even if the user notices something, he hardly knows how to search in KB by the name of the vendor (or even distributor) to see if there are any problems with it. And even if the user can find the KB, he will have to contact the manufacturer directly, bypassing the distributor, which could violate his warranty.
- If the file server works like a NAS, the user most likely does not even know what works inside the sealed plastic box. To upgrade, you will need to wait for the vendor to release a new firmware, and until then the user will have to endure data loss.
- If the server is not under the control of the user, then he will have to ask the administrator about the driver upgrade, and hope that the administrator will go for it.
- Since Windows XP does not use “fast” queries and does not have this problem, users will consider this a bug in Windows Vista.
Automatically diagnose the error driver, and issue a warning dialog
Explorer should recognize this strange error code, and show a dialog that says “Server \\ servername seems to work with the old version of the XYZ driver, which does not work correctly with directories with a large number of files. Not all files are shown here. Contact the administrator \\ servername to upgrade the driver. " And tick "Do not show the message again."
pros
- The user will be notified of an incomplete result.
Minuses
- The user can not do anything with this incomplete result. It will be like “Ha ha, you lost!”
- Users often do not know who the server administrator is, and the desire to contact the administrator usually causes a reaction - “Wow, who is this?”, Or even “It's me! And I absolutely do not understand what this message means. ” (Remembering the home NAS)
- The administrator may have his reasons for not upgrading the driver on the server (for example, because it violates the warranty), and is unlikely to be satisfied that users constantly inform him of the contents of the new dialogue.
- And, since Windows XP does not support “fast” requests, users will consider this a bug in Windows Vista.
Automatically diagnose the faulty driver, and next time use a different type of query.
Explorer should recognize this strange error code, and say, “Ok, this server has an invalid driver. It's too late to do anything, but next time, I will use a slow request to access the server. ”
To eliminate the possibility of a DOS attack, you only need to remember, say, the last 16 servers (if the list is unlimited, the attacker can overwhelm all the memory by creating a server that responds with a million different names with this error code).
Pros:
- Windows automatically detects the problem and fixes it.
Minuses
- The first list of files from the server will still be wrong.
- If you regularly visit 16 (say) servers, when you visit 17, the first one will leave the cache, and the next time it will return the wrong list again.
- You can also develop a mechanism that allows the network administrator to determine the list of "bad" servers.
- And since Windows XP does not support fast queries, users will consider this a bug in Windows Vista.
Make the setting in the network client, which includes the "slow" mode.
Add a setting in the network client "If someone asks if the server supports fast requests, always say No, even if the server said Yes." In this case, none of the programs will try to use the “fast” mode, everyone will use only the slow one. But at least it will work.
pros
- If this setting is enabled, the user will never get the wrong data.
Minuses
- Since the definition is not automatic, the problems are the same as in the first case “Do nothing”. Users should know that they have a problem and know what to look for in order to find this setting in KB. Prior to this, the summarization will look as if it is a bug in Windows Vista.
- Servers that work normally will also work in a slow mode, despite the fact that they correctly support “fast” requests.
Make a setting in Explorer that turns on “slow” mode
Make a setting in Explorer that says "Always use slow mode, never use quick queries." Requests will go slower, but will always work. But, this will only affect the work of Explorer; other programs that ask "Does the server support quick queries?" will receive an appropriate response, and if they try to use "quick" queries, they will get all the same problems that Explorer has already solved.
pros
- If this setting is enabled, the user will never get the wrong data.
Minuses
- Plus, as indicated in the previous paragraph, each program will have its own setting for this behavior.
Disable default quick mode
Stop supporting fast mode in the network client, as it is unreliable; Some servers do not support it correctly. This will force all programs to use the slow mode. However, leave the option to turn it back on.
Pros:
Minuses:
- “Quick mode” could not be developed at all. It is disabled by default, and almost no one will bother to turn it on, because everything already works.
- People will blame Microsoft for cheating, because customers are running in “slow mode”, despite the fact that servers support “fast”. And, of course, Microsoft products will be inferior to competitors that support fast mode without any restrictions.
Be creative. If you bring your decision, make a list of pros and cons.
Another obvious option, not described by Raymond in the article, but answered in the comments.
When reading for the first time, if the error returned, immediately re-read the list and return the full one, and then treat the server as if it were slow.
Not suitable because: the network client does not return the list when the request is completed, but in parts, asynchronously, at run time. So the first part of the list can be returned (and used by the client program) even before the network client receives an error and realizes that it is necessary to re-read the list.
And I immediately respond to comments like “Microsoft needs to open and fully document its protocols, they are to blame.” The bug , about which Raymond writes, has nothing to do with the correct execution of the protocol.