summaryrefslogtreecommitdiff
path: root/bugs/sftp-round-trip-optimisation-results-in-scary-log-messages.mdwn
blob: 3626452a78b8069e14c3e93f929c19dc28c8a4cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[[!tag obnam-wishlist]]

I've done a fair bit of work to optimise away a whole bunch of round
trips over sftp. For example, renaming a file over sftp can fail, if
the target name already exists. So we try to remove it first. The
pretty way of doing that would be to check if the target exists before
trying to remove it. However, that would mean an extra round trip,
when the target does exist.

Pretty:

    1. does target exist?
    2. if it exists, remove
    3. rename

Ugly:

    1. try to remove target, and ignore a failure due to target not
       existing
    2. rename

Unfortunately, doing things the ugly way results in the log file
containing a lot of tracebacks from paramiko. They're benign, but
they look scary, and they fill the log with useless text.

Reported-By: Jordi Marqués


Could obnam just catch the exception and therefore stop the scary tracebacks from appearing in the logfile?  - Andrew Ruthven


This is fixed now. It was a problem with Obnam debugging output,
not paramiko's fault at all. --liw [[done]]