In many cases Subversion will create files there, then write its contents and
when done move the file to the required location in your working copy. This
makes sure that you will never see half written files during operations… and by
that loose valuable information.
Bert
From: Keva-Slient [mailto:[email protected]]
Sent: donderdag 21 december 2017 08:29
To: users <[email protected]>; 王运 <[email protected]>; bluecat
<[email protected]>
Subject: when will file ./svn/tmp/svn-XXXXXX be created? and why?
we use svn managing our config files.
in client side environment, check out repos in client side, processes could
open the config file and read or write the config file. some of them could keep
file handler for a long time.
now we get some problems: the config file will be moved to .svn/tmp directory
and be deleted.
for example: online_assist process:
online_assist will open some config files in /wns/etc/config/ directory.
/wns/etc/config/ is a repo.
use losf to see which files online_assist are opening.
#lsof |grep online_assist |grep .svn/tmp
704 /wns/sbin/online_assist /wns/etc/config/.svn/tmp/svn-ynboPV (deleted)
704 /wns/sbin/online_assist /wns/etc/config/.svn/tmp/svn-sTknMU (deleted)
704 /wns/sbin/online_assist /wns/etc/config/.svn/tmp/svn-39HEsA (deleted)
online_assist should open config files which are not in .svn/tmp directory.
in usual, online_assist should open config files like :
/wns/etc/config/db/ap_data.db ...
#pidof online_assist
704
#ls -l /proc/704/fd/* -l |grep config |sort -k 10
lrwx------ 1 root root 64 Dec 20 08:22 /proc/704/fd/19 ->
/wns/etc/config/.svn/tmp/svn-39HEsA (deleted)
lrwx------ 1 root root 64 Dec 20 08:22 /proc/704/fd/18 ->
/wns/etc/config/.svn/tmp/svn-sTknMU (deleted)
lrwx------ 1 root root 64 Dec 20 08:22 /proc/704/fd/15 ->
/wns/etc/config/.svn/tmp/svn-ynboPV (deleted)
lrwx------ 1 root root 64 Dec 20 08:22 /proc/704/fd/23 ->
/wns/etc/config/db/china_province_city.db
lrwx------ 1 root root 64 Dec 20 08:22 /proc/704/fd/20 ->
/wns/etc/config/db/phonelocation.db
lrwx------ 1 root root 64 Dec 20 08:22 /proc/704/fd/16 ->
/wns/etc/config/wac/data/ouiol.db
lrwx------ 1 root root 64 Dec 20 08:22 /proc/704/fd/21 ->
/wns/etc/config/wac/data/ouiol.db
lrwx------ 1 root root 64 Dec 20 08:22 /proc/704/fd/17 ->
/wns/etc/config/wac/data/sta_login_stat.db
lrwx------ 1 root root 64 Dec 20 08:22 /proc/704/fd/22 ->
/wns/etc/config/wac/data/wti.db
some files opened by online_assist in /wns/etc/config are correct, like
/wns/etc/config/wac/data/ouiol.db. but some are moved to
/wns/etc/config/.svn/tmp and deleted.
why is this ?
why would the file opend by process be moved to .svn/tmp
and
why would the file moved to .svn/tmp be deleted?
------------------
.........
Vanity...My favourite sin.
--<<The Devil's Advocate>>